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


Caravel Forum : DROD Boards : Architecture : Scripting Question (I want to do something but I'm not sure how.)
New Topic New Poll Post Reply
Poster Message
Banjooie
Level: Smitemaster
Avatar
Rank Points: 1645
Registered: 12-12-2004
IP: Logged
icon Scripting Question (0)  
What I want, essentially, is a code that goes something like this.

<First Label>
"Hey, is Halph at (a,b)? Yeah? Okay, go to <Label>. If not.."
"Hey, is Halph at (b,c)? Yeah? Okay, go to <Label2>. If not.."
"Hey, is Halph at (c,d)? Yeah? Okay, go to <Label3>. If not, what the hell, go to <First Label>."

So, I'm not quite sure how to do 'check to see if Halph is at ____ point'.

06-03-2005 at 09:43 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
krammer
Level: Smitemaster
Avatar
Rank Points: 904
Registered: 02-12-2003
IP: Logged
icon Re: Scripting Question (0)  
Use this code:
Label Start
Wait 1 turn
If... Go To Label1
Wait for Halph at (specify area)
If... Go to Label2
Wait for Halph at (specify area)
If... Go to Label3
Wait for Halph at (specify area)
Go to Start

Does that help?

____________________________
+++ Divide by Cucumber Error +++ Please Reinstall Universe and Reboot +++

"Oook!"
06-03-2005 at 11:10 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Banjooie
Level: Smitemaster
Avatar
Rank Points: 1645
Registered: 12-12-2004
IP: Logged
icon Re: Scripting Question (0)  
Doesn't work.

I, er. Well, it works, very strangely, after the fact, and not nearly instanteously enough to be of any real use.

[Edited by Banjooie at Local Time:06-03-2005 at 06:47 PM]
06-03-2005 at 06:37 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Doom
Level: Smitemaster
Avatar
Rank Points: 3226
Registered: 07-05-2004
IP: Logged
icon Re: Scripting Question (0)  
What if you add "Go to start" into the end of label 1, label 2 and label 3?
06-03-2005 at 06:42 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
Banjooie
Level: Smitemaster
Avatar
Rank Points: 1645
Registered: 12-12-2004
IP: Logged

File: A Bunch Of Really Cool Things.hold (8.3 KB)
Downloaded 83 times.
License: Other
From: Unspecified
icon Re: Scripting Question (0)  
Alright, lemme just upload the hold I'm trying to do this with.

Just go into the editor, edit the Joystick map. The idea is to make Beethro cause the Slayer character to change directions.


06-03-2005 at 06:50 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
schep
Level: Smitemaster
Avatar
Rank Points: 865
Registered: 03-01-2005
IP: Logged
icon Re: Scripting Question (+1)  
You probably want to change some things into loops. For example, if Beethro (and Halph) do nothing at the start, then the invisible character among the orbs goes straight past all of the tests into the "HalphUp" section. Take another look at krammer's example, which goes back to the start of the script after all the tests. You also need a Wait 1 turn(s) somewhere in the loop (krammer chose to put it at the beginning) so that the character doesn't run into an infinite loop during one game turn.

As far as timing goes, be aware that the Strike orb at command takes up a turn.

Oh, and some of your Strike orb at commands are pointing at squares without orbs.
06-03-2005 at 09:57 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 Question (I want to do something but I'm not sure how.)
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.