Help - Search - Members - Calendar
Full Version: #if
Achaea's Forums > Off-Topic > Tech Support > Client Help
Mickelson
Can someone using Nexus explain #if to me? I've played around with it for months, read the help files, and asked anyone I thought would know anything, and I -still- don't know how it works. Namely that nasty little "elsif" piece.
Mishgul
#if $prone=1 {#send stand} elsif $prone=0 {#echo You are already standing!} else {#echo There is nothing else you can be!}
Eurulis
That actually helps me a bit too, though you will have to explain the $prone=1 part...
Rynn
QUOTE (Eurulis @ Aug 21 2009, 08:47 PM) *
That actually helps me a bit too, though you will have to explain the $prone=1 part...

That's a variable. 1 tends to be 'true' and 0 tends to be 'false'.

Rynn sweepkicks you.
#set prone 1
<carmain's trigger>
You stand up.
#set prone 0

I ninja'd Sena, but she is better with them word things than I are. I mean am.
Sena
$prone is a variable, which is presumably set by other triggers that match whether or not you're prone. 1 is true, meaning you are prone, 0 is false, meaning you're not prone.

#if $prone=1 {#send stand} would mean "If you're prone, stand."
Teg
ahhhh the if statement, so fundamental
Mickelson
Huh.

Well, I guess that answers some of my questions, but I've been trying to make an #if " " { highlight } trigger, and only -just- figured out you can't use "bolds. Dunno, should I bug that?
Boz
QUOTE (Mickelson @ Aug 22 2009, 11:21 AM) *
Huh.

Well, I guess that answers some of my questions, but I've been trying to make an #if " " { highlight } trigger, and only -just- figured out you can't use "bolds. Dunno, should I bug that?


If you mean you want to highlight "Boz kicks you", for instance, just make a trigger. You don't need to do anything except #highlight <color>.

Now, if you want it to highlight on a condition, like if you are prone and I kick you, make a trigger of the line (Assuming you have a prone counter, using $prone for the example) #if $prone = 1 {#highlight red}.

EDIT: Also, Nexus isn't as powerful as most things, but it is pretty simple to code on. It can't match colors for triggers, and you can't change the font type with triggers etc, at least I don't think you can.
Jonathin
If statements ARE one step proofs.
^If you've taken geometry you'll understand.


IF Jonathin is an occultist, THEN he has occultism.
#if $jonathin=occultist [[[this is where the THEN would be, but you leave it out]]] {#echo he has occultism}

For something that has to be a wildcard (such as {w} or {*}), you'd just do


Pattern: {w} is an occultist.
Script: #if $1=jonathin {#echo he has occultism}


Or for instance, you have a single variable for an ally.

Alias: addally
Script: #set ally $1

Trigger: {w} [[[for a one word capture]]]
Script: #if $1=$ally {#highlight (yourcolors)}
Gorlasintan
QUOTE (Jonathin @ Aug 23 2009, 12:15 AM) *
If statements ARE one step proofs.
^If you've taken geometry you'll understand.

I hate you for this analogy.
Jonathin
Why?
Gorlasintan
Because proofs are a terrible evil.
Jonathin
lol, I liked them.
Back when I was in high school

and thought that my silly high school problems mattered.


I just realized how naive I was.


I hate math now.
Boz
QUOTE (Jonathin @ Aug 23 2009, 01:35 AM) *
lol, I liked them.
Back when I was in high school

and thought that my silly high school problems mattered.


I just realized how naive I was.


I hate math now.


We are doing sequences. Hooray for learning to count in a college level math class! biggrin.gif
Trevize
QUOTE (Gorlasintan @ Aug 23 2009, 01:32 AM) *
Because proofs are a terrible evil.

Geometry is a terrible evil. sad.gif

I can do it, I'm good at it, I just hate it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.