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


Caravel Forum : DROD Boards : Architecture : Script usage... (Im beginner, and have 3 questions.)
New Topic New Poll Post Reply
Poster Message
Bjoern
Level: Roachling
Rank Points: 11
Registered: 07-16-2013
IP: Logged
icon Script usage... (+1)  
Hello. I love to create levels for DROD. And just downloaded DROD Gateb.

1. I customize some characters. Like visible roaches that move in a specific direction, and at last, they turn into monster. At the end of the script I use the command "END", and think it will tell the NPC not to run the script again after conquering the room. But after Re-entering, it still run the script...

2. Hope there is a way to freeze Beethro when he speech with a citizen. And then let him be able to move after the speech?

3. I cant figure out how to let Beethro speech with a citizen. And right after the speech, let the citizen turn around and move out of the room. Speech-function is delayed by "time". But make a character move in a specific way is delayed by "turns". So I dont know if it possible.
07-16-2013 at 05:03 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5064
Registered: 02-04-2003
IP: Logged
icon Re: Script usage... (+1)  
Hi, Bjoern. Sorry I didn't answer your e-mail on this topic yet. I'll just reply here.

To make a character monster not reappear when reentering a clean room, do
If ...
Wait for clean room
Else
Appear
<do stuff>
If End


This will have the character only appear if the room is not clean on entrance. You don't need the "End" command in order for this to work.

If you want to freeze Beethro and set up some specific timing for speech or character actions to play out, use the "Cut scene" script command. You indicate how many milliseconds you would like to elapse between each turn, and during this time, the player will automatically use a "wait" move command each turn. When you are done with the cut scene, do "Cut Scene 0" to turn it off.

So, for instance, you could do:

Cut scene 250
Speech "Beethro, I love your hair!"
Wait 15
Cut scene 0


You can also coordinate speech timing and moves/turns in this fashion.

Edit: Oh, and we should probably move this thread to the "Architecture" board after you've seen my reply, since this is not a bug report.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.

[Last edited by mrimer at 07-16-2013 05:10 PM]
07-16-2013 at 05:07 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
12th Archivist
Level: Smitemaster
Avatar
Rank Points: 789
Registered: 12-07-2008
IP: Logged
icon Re: Script usage... (+1)  
Bjoern wrote:
1. I customize some characters. Like visible roaches that move in a specific direction, and at last, they turn into monster. At the end of the script I use the command "END", and think it will tell the NPC not to run the script again after conquering the room. But after Re-entering, it still run the script...
When you use the "Turn into monster" command, it prevents all additional scripts from being run. This because the command will literally turn the NPC into a monster, not just make the NPC *act* like a monster. Unfortunately, there is no script that will let an NPC mimic roach behavior perfectly, but you can use "Imperative: End when killed", I think.
2. Hope there is a way to freeze Beethro when he speech with a citizen. And then let him be able to move after the speech?
There is! Refer to this post for my explanation of cutscenes.
3. I cant figure out how to let Beethro speech with a citizen. And right after the speech, let the citizen turn around and move out of the room. Speech-function is delayed by "time". But make a character move in a specific way is delayed by "turns". So I dont know if it possible.
Use a third character (typically, this character is invisible in a corner somewhere) that has speech commands for Player and for the visible character that is speaking. Unfortunately, the speech and moving of the character will not be lined up. Alternatively, you can use cutscenes to make the character say stuff, then have a wait command, then walk away.

I hope this helps. Happy DRODing. :)

____________________________
It was going well until it exploded.
~Scott Manley

Check out the DROD Wikia project here!
07-16-2013 at 05:10 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Bjoern
Level: Roachling
Rank Points: 11
Registered: 07-16-2013
IP: Logged
icon Re: Script usage... (0)  
Thanks for the answers. It helps very much, and I just got it to work, So im ready to create some rooms with own music (Have so much music that I think its just so good to the game) :)
07-19-2013 at 08:57 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Architecture : Script usage... (Im beginner, and have 3 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.