Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : General : Scripted Tokens
New Topic New Poll Post Reply
Poster Message
GerAvos
Level: Delver
Rank Points: 51
Registered: 05-28-2016
IP: Logged
icon Scripted Tokens (0)  
I'm looking for help with a script. My scripted token has 2 different problems.

First: Since it is an invisible character using imperative ghost display, you can't right click it to check what it is ingame. Any idea how to solve this?

Second: Since I'm using "wait for player to touch me" it doesn't work with mimics, decoys and temporal time clones.

Here's my script. It freezes all water in the room. (Feel free to use it yourself if you like)
  Imperative 13
  Face direction North
Label Start
  Wait for player to touch me 
  Set var "_MyScriptX" = 0
  Set var "_MyScriptY" = 0
  Set var "WaterChanged" = 0
Label FreezeAllWater
  If ... 
        Wait for item Water,0,0,0,0
     Build Thin ice,0,0,0,0
     Game effect Center,Splash,0,0,Off
     Set var "WaterChanged" = 1
  If End 
  If ... 
        Wait until var "_MyScriptY" = 32
     Set var "_MyScriptX" = -9999
     Set var "_MyScriptY" = -9999
     If ... 
           Wait until var "WaterChanged" = 1
        Face direction northeast
        Go to UsedToken
     If End 
     Go to OnToken
  Else If 
        Wait until var "_MyScriptX" = 38
     Set var "_MyScriptX" = 0
     Set var "_MyScriptY" + 1
  Else 
     Set var "_MyScriptX" + 1
  If End 
  Go to FreezeAllWater
Label OnToken
  Wait 0
  If ... 
        Wait for player to touch me 
     Go to OnToken
  If End 
  Go to Start
Label UsedToken


[Last edited by GerAvos at 06-05-2016 01:52 PM]
06-05-2016 at 01:52 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
hyperme
Level: Smitemaster
Avatar
Rank Points: 1169
Registered: 06-23-2006
IP: Logged
icon Re: Scripted Tokens (0)  
Unfortunately, there's nothing you can do to make a Ghost Display NPC clickable.

For the non-player activation, you can use a Wait for Entity command instead. Set _MyScriptX and _MyScriptY to the tokens _MyX and _MyY values, and then use Ctrl-clicking to select multiple things to check for in Wait for Entity.

____________________________
[Insert witty comment here]
Qzvlkx?
06-05-2016 at 02:18 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
GerAvos
Level: Delver
Rank Points: 51
Registered: 05-28-2016
IP: Logged
icon Re: Scripted Tokens (0)  
Can you make a visible character you can walk on?

I also have no idea how to set _MyScriptX and _MyScriptY to the tokens if the position of the token could be anywhere.

xd
06-05-2016 at 04:46 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
hyperme
Level: Smitemaster
Avatar
Rank Points: 1169
Registered: 06-23-2006
IP: Logged
icon Re: Scripted Tokens (0)  
You can't make a visible character walkable. Such is life.

For the token's position, you can use _MyX and _MyY, which are always equal the NPC's position.

____________________________
[Insert witty comment here]
Qzvlkx?
06-05-2016 at 06:33 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
GerAvos
Level: Delver
Rank Points: 51
Registered: 05-28-2016
IP: Logged
icon Re: Scripted Tokens (0)  
Alright, thank you!
06-05-2016 at 06:54 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : General : Scripted Tokens
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.