Announcement: Why not try our official idea generator for inspiration when making puzzles?


Caravel Forum : DROD Boards : Architecture : Scripting Questions
New Topic New Poll Post Reply
Poster Message
IQubic
Level: Delver
Rank Points: 78
Registered: 11-22-2015
IP: Logged
icon Scripting Questions (0)  
How do I make it so that a script is only run when Beethro steps onto the same tile as a character? How do I make the said script cause Beethro to speak?

Also, I want the character to be invisible and not killable.

____________________________
119th Skywatcher

[Last edited by IQubic at 06-19-2016 07:14 PM]
06-19-2016 at 07:08 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Kallor
Level: Master Delver
Rank Points: 277
Registered: 04-02-2007
IP: Logged
icon Re: Scripting Questions (+1)  
Just don't check the "visible" box of the special character to make keep invisible and thus immortal. You can have Beethro speak stuff with the scrip command "Wait for entity - Beethro", choose the coordinates and another command "Speech - Beethro" and type whatever. It doesn't really matter where this scripted character actually is.

Unless you meant that you're planning to make many copies of this custom character, in which case for convenience you actually want to refer to coordinates of the invisible character. Then do this:

Loop: (made with "Label" command)
"If..."
"Wait until var _MyX = _X" (type _X into the amount field)
"If..."
"Wait until var _MyY = _Y"
"Speech Beethro (1600) 'Hello!'" (made with "Speech" command)
"If End"
"If End"
"Wait 0 turn(s)" (made with the plain "Wait" command)
"Goto 'Loop'" (made with "Goto" command)

____________________________
Kallor

[Last edited by Kallor at 06-19-2016 07:51 PM]
06-19-2016 at 07:50 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2670
Registered: 07-11-2014
IP: Logged
icon Re: Scripting Questions (+1)  
If a character is invisible then "Wait for player to touch me" will trigger when the player steps onto the same square as it.
06-19-2016 at 07:59 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Kallor
Level: Master Delver
Rank Points: 277
Registered: 04-02-2007
IP: Logged
icon Re: Scripting Questions (+1)  
Well that's marginally easier :D

____________________________
Kallor
06-19-2016 at 08:03 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
GerAvos
Level: Delver
Rank Points: 51
Registered: 05-28-2016
IP: Logged
icon Re: Scripting Questions (0)  
Can you teleport the player to another level without using stairs? Or can you build stairs maybe?

How do you make it so that leaving the room teleports you to another level?

[Last edited by GerAvos at 06-22-2016 05:55 PM]
06-22-2016 at 05:53 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: 1060
Registered: 06-23-2006
IP: Logged
icon Re: Scripting Questions (+1)  
The 'Go To Level Entrance' command allows you send the player to all sorts of wonderful places. Combine will 'Wait for Entity' to have room edge exits.


Stairs can't be built. You can remove them with building, but not add them.

____________________________
[Insert witty comment here]
Qzvlkx?
06-22-2016 at 06:32 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: Scripting Questions (0)  
How can I make a room where you hit an orb to permanently open a block on another room? All I need would be a variable that gets carried over through rooms and levels. (Edit: Figured this out by myself. Use "Start global script" to make a character's default script play in every room.)

Also, I don't really understand orientation. How do you remember which value corresponds to which direction?

Hope you don't mind me reusing this thread yet again ;)

[Last edited by GerAvos at 07-07-2016 05:27 PM]
07-07-2016 at 04:32 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Nuntar
Level: Smitemaster
Avatar
Rank Points: 4590
Registered: 02-20-2007
IP: Logged
icon Re: Scripting Questions (+2)  
In the list of script commands, scroll down to "Set var". At the top-right, a box will appear allowing you to create new variables by entering a name and clicking the "Add" button (not "Add" in the list underneath, which refers to arithmetical addition of variables).

Orientation: 0 = NW, 1 = N, 2 = NE, 3 = W, 4 = neutral, 5 = E, 6 = SW, 7 = S, 8 = SE. It's regular, but you just have to remember the pattern.

____________________________
50th Skywatcher
07-07-2016 at 05:28 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: Scripting Questions (0)  
Thanks, that helped!

Another question: Why are rooms that have only required scripted monsters automatically cleared without killing the required monsters? I always need at least 1 non scripted monster. However, in The Second Sky there were rooms that had only scripted monsters.
07-27-2016 at 03:00 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
bomber50
Level: Smitemaster
Rank Points: 872
Registered: 09-18-2006
IP: Logged
icon Re: Scripting Questions (+1)  
I don't think there are any rooms like that. Several rooms in TSS have non-scripted monsters killed by scripting on Turn 0.
07-27-2016 at 03:05 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Insoluble
Level: Smitemaster
Avatar
Rank Points: 1638
Registered: 09-04-2014
IP: Logged
icon Re: Scripting Questions (+1)  
Rooms with only a required scripted monster will count as cleared when you enter. I'm not an expert, but I believe this is because the "imperative required target" script gets run after the initial check to see if the room is clear. The way to get around this is to place some sort normal monster (a spider works nicely for this since it is invisible) out of the way somewhere. Have the script "attack tile" set to "kill" on the tile that monster is on during turn zero.

____________________________
Links to neat forum tools that I always have trouble finding:
Click here to view the secret text

07-27-2016 at 03:16 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Architecture : Scripting Questions
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.