Jump to content

Photo

Variable help and also position and DMap help please


  • Please log in to reply
1 reply to this topic

#1 LikeLike888

LikeLike888

    Spicy food lover!!

  • Members
  • Real Name:Jason
  • Location:North America

Posted 24 December 2017 - 05:55 AM

An at least example of a variable is

Link.HP

 

 

 

#1: In ZScript what is the variable that applies to Link's HP please?

 

 

 

#2: In ZScript what is the variable that applies to Link's x position (spot)?

 

 

 

#3: In ZScript what is the variable that applies to Link's y position?

 

 

 

#4: In ZScript if I want to check if in DMap 0

what do I type?

 

 

 

#5: In ZScript if I want to check if on screen 0C

what do I type?

 

 

 

#6: If I want a script to apply to DMap 0 how would I make such a script apply to DMap 0 please?

 

 

 

#7: If I want a script to apply to screen 0C on DMap 0 how would I make such a script apply to screen 0C on DMap 0 please?

 

 

 

Thank you for your help - Jason


  • Yuuki likes this

#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 25 December 2017 - 01:17 AM

An at least example of a variable is
Link.HP

 
#1: In ZScript what is the variable that applies to Link's HP please?



Link->HP

 

#2: In ZScript what is the variable that applies to Link's x position (spot)?


Link->X
 
 

#3: In ZScript what is the variable that applies to Link's y position?


Link->Y
 
 

#4: In ZScript if I want to check if in DMap 0
what do I type?


if ( Game->GetCurDMap() == 0 )

 

#5: In ZScript if I want to check if on screen 0C
what do I type?

 

if ( Game->GetCurScreen() == 0x0C )
 
 

#6: If I want a script to apply to DMap 0 how would I make such a script apply to DMap 0 please?
 
 
 
#7: If I want a script to apply to screen 0C on DMap 0 how would I make such a script apply to screen 0C on DMap 0 please?


You would need to do this via the global active script, in general, inside the main while loop. If you want to run a script only on a specific screen, you are better-off making an ffc script, and using it on that screen. (Scripts run by ffcs only run on the screen on which the ffc exists.)

 

You can code the ffc script to limit it to a specific DMap, if the screen is on more than one DMap.

I suggest that you read zscript.txt and learn the basic commands before you plunge into creating anything complex. It contains the answers to all of the questions that you asked.
 


  • Yuuki likes this


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users