Thread: Variables
View Single Post
  #2  
Old 02-27-2002, 04:23 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Re: Variables

Quote:
Originally posted by WHIPENIE4
Ok im slowly learning how to script , im kinda stuck on varibles... when do you use them??

In the example they use in npcprogramming
myvar = 1;
if (myvar==1) {..........}

So if the varible ='s 1 then the command in {.....} will be executed...... but lets say
the command in the {...} was messageHello;
then why not just put
If (playertouchsme) messageHello;
???
Or 'playerenters'

[edit]Also what do these symbols mean
>,<,>=,<=,==,!= , or when do you use them?[/edit]
Well 'if (playertouchsme)' is so if the player touchs the NPC and 'if (myvar==1)' can be set in a variety of ways ...

> - greater than
< - less than
>= - greater than or equal to
<= - less than or equal to
== - is equal to
!= - not equal to (I dont think exists)
Reply With Quote