Announcement: Be excellent to each other.


Caravel Forum : DROD RPG Boards : RPG Feature Requests : "Or' Script Command
New Topic New Poll Post Reply
Poster Message
12th Archivist
Level: Smitemaster
Avatar
Rank Points: 789
Registered: 12-07-2008
IP: Logged
icon "Or' Script Command (0)  
Pretty simple and straightforward. The "Or" script command simple separates a "Wait"* script command from another Wait"* command. Let's say you're making a script where the character waits until there is no more you at the coordinates (using _X and _Y).

Now since there's no way you can just say, "Wait while var _X/Y is at [coordinates], you will probably have to use an If statement four times over for the "waiting until var _X is less than _MyX and waiting until var _Y is less than _MyY and waiting until var _X is greater than _MyX and waiting until var _Y is greater than _MyY". That's a lot of other variables and If, If End statements!

Finally, I can't just say "Wait while entity is Player at [coordinates]" since the script is within the "Edit Default Script" and not the usual screen. I don't want to copy and paste 500 times and then change every single "Wait while entity is Player at [coordinates]" because that's boring and I have more stuff to do than change 499 scripts.

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

Check out the DROD Wikia project here!
12-29-2008 at 12:53 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Kwakstur
Level: Smiter
Avatar
Rank Points: 385
Registered: 05-05-2006
IP: Logged
icon Re: "Or' Script Command (+3)  
"And" and "Or" have been suggested so many times before. Everybody wants them, but it doesn't look like we'll ever get them. We do have workaround suggestions, though. Here's the easiest way I've found to have them:
Click here to view the secret text

12th Archivist wrote:
Now since there's no way you can just say, "Wait while var _X/Y is at [coordinates], you will probably have to use an If statement four times over for the "waiting until var _X is less than _MyX and waiting until var _Y is less than _MyY and waiting until var _X is greater than _MyX and waiting until var _Y is greater than _MyY". That's a lot of other variables and If, If End statements!
Not quite.
Click here to view the secret text
Finally, I can't just say "Wait while entity is Player at [coordinates]" since the script is within the "Edit Default Script" and not the usual screen.
Ah, there's more script vars for that.
Click here to view the secret text
You can always check F1 for the information on the _MyScript vars. Setting these before certain commands will let you use variables to affect stuff like Wait for entity at or Generate entity (facing a certain direction), which normally don't let you use variables.
You can script a lot of stuff easily without them, but when it comes to stuff like this, you'll be glad you know how they work.

____________________________
Also known as ExpHP everywhere else.

[Last edited by Kwakstur at 12-29-2008 01:44 AM]
12-29-2008 at 01:12 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
12th Archivist
Level: Smitemaster
Avatar
Rank Points: 789
Registered: 12-07-2008
IP: Logged
icon Re: "Or' Script Command (0)  
Thanks, Kwakstur. Those are some good ways of cutting around problems.

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

Check out the DROD Wikia project here!
12-29-2008 at 01:29 AM
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: "Or' Script Command (+1)  
Wait for All, Wait for Any, Wait for Exactly One and Wait for Conditions End implemented in 1.3 covers off this request and they work well.

[Last edited by kieranmillar at 06-11-2023 09:49 AM]
06-11-2023 at 08:29 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD RPG Boards : RPG Feature Requests : "Or' Script Command
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.