Mystic Software Forums

Mystic Software => General Discussion => Topic started by: Aminaga on March 20, 2005, 11:43:56 AM

Title: (no subject)
Post by: Aminaga on March 20, 2005, 11:43:56 AM
Okay, I'm trying to make a cool mini game in The Blade of Champion where your in an escape pod, and you're trying to get away from the exploding airship which will kill you if you run into it.

So, how can you make a program on your board that tries to come at you, and kill you?
Title: (no subject)
Post by: Number Eight on March 20, 2005, 01:48:15 PM
well, you can customize its multitask program to follow the hero and then you can do an x y check in the program and if it is by the hero then it will cause damage.
Title: (no subject)
Post by: Aminaga on March 20, 2005, 03:18:40 PM
Accually, I wan't it to follow the hero/escape pod, and run the game over program if it runs into poor Aminaga.
Title: (no subject)
Post by: Number Eight on March 20, 2005, 08:33:46 PM
Well, that's what I said.
 
Code: [Select]
:loop
 #playerX[0]!=followx!
 #playerY[0]!=followy!
 #ItemStep(<put your item number here>, followx!, followy!)
 #ItemStep(<put your item number here>, followx!, followy!)
 #ItemStep(<put your item number here>, followx!, followy!)
 #ItemStep(<put your item number here>, followx!, followy!)
 #ItemStep(<put your item number here>, followx!, followy!)
 #branch(:loop)
 
That should work. Of course you can change how many itemsteps depending on how fast you want the thing to go. I'm not quite sure how to get the thing to run the game over program if it gets you, but you can try making it run the game over program as the "pick up" program.
Title: (no subject)
Post by: Aminaga on March 21, 2005, 05:57:22 AM
Hmmm, I'll try that out.
Title: (no subject)
Post by: Number Eight on March 21, 2005, 09:25:32 AM
Glad to be of service Razz
Title: (no subject)
Post by: Xorlak on March 21, 2005, 11:47:26 AM
Just in case you're using TK2, note the player coordinates won't update in the middle of a program (which just means you'll have to update them yourself based on what key the player presses).

Obviously, Colin fixed this for TK3.  (Right?  Heh...)
Title: (no subject)
Post by: Dude Man on March 28, 2005, 02:00:43 PM
Heh, yeah. If you need a tip on how to do that, you could have a wait(a$) thing, going on. And when you press UP or DOWN or LEFT or RIGHT. You use the Push Command, and then update the cords.

Hey! That would work.  I thing I'm going to make a Mini-Game like that, or something... <_<
Title: (no subject)
Post by: Aminaga on March 28, 2005, 02:29:33 PM
Give me an example of the code, and I'll try it out!
Title: (no subject)
Post by: Dude Man on March 28, 2005, 02:41:11 PM
Maybe later...I'm busy.
Title: (no subject)
Post by: Colin on March 29, 2005, 08:37:02 PM
Quote from: "Xorlak"
Obviously, Colin fixed this for TK3.  (Right?  Heh...)


In TK3, they _should_ be always up to date, but if they're somehow not, there's even a setConstants() function. Smile
Title: (no subject)
Post by: Xenxer on May 13, 2005, 10:40:25 PM
Couldn't you just do something like this to run the game over program?

<!--r1--><div class='codetop'>CODE</div><div class='codemain'><span style="font-family:courier;font-size:11px;white-space:pre;"><span style="color:#F80;">
<a name="ID9b66741b3fb29b672bc2ae62d66bf8d1LINE1"></a></a>
<a name="ID9b66741b3fb29b672bc2ae62d66bf8d1LINE2"></a><span style="color:#00F;font-weight:bold;">itemLocation</span><span style="color:#94F;">(<put your item number here>, <span style="color:#048;">airshipx!</span>, <span style="color:#048;">airshipy!</span>, <span style="color:#048;">airshiplayer!</span>)</span></a>
<a name="ID9b66741b3fb29b672bc2ae62d66bf8d1LINE3"></a><span style="color:#00F;font-weight:bold;">if</span><span style="color:#94F;">(<span style="color:#048;">airshipx!</span> == <span style="color:#048;">followx!</span>)</span></a>
<a name="ID9b66741b3fb29b672bc2ae62d66bf8d1LINE4"></a><span style="color:#94F;">{</span>
<a name="ID9b66741b3fb29b672bc2ae62d66bf8d1LINE5"></a>   <span style="color:#00F;font-weight:bold;">if</span><span style="color:#94F;">(<span style="color:#048;">airshipy!</span> == <span style="color:#048;">followy!</span>)</span></a>
<a name="ID9b66741b3fb29b672bc2ae62d66bf8d1LINE6"></a>   <span style="color:#94F;">{</span>
<a name="ID9b66741b3fb29b672bc2ae62d66bf8d1LINE7"></a>      <span style="color:#00F;font-weight:bold;">over</span><span style="color:#94F;">()</span></a>
<a name="ID9b66741b3fb29b672bc2ae62d66bf8d1LINE8"></a>   <span style="color:#94F;">}</span>
<a name="ID9b66741b3fb29b672bc2ae62d66bf8d1LINE9"></a><span style="color:#94F;">}</span>
<a name="ID9b66741b3fb29b672bc2ae62d66bf8d1LINE10"></a></a>
</span><form action="/sources/misc/save_prg.php" method="POST"><textarea style="display:none" name="source"> itemLocation(<put your item number here>, airshipx!, airshipy!, airshiplayer!) if(airshipx! == followx!) { if(airshipy! == followy!) { over() } } </textarea><input type="submit" value="Save" /><input type="checkbox" name="html" value="true" /> Save As HTML?</form></span></div><span style="display:none"><!--er1--><!--r2--> itemLocation(<put your item number here>, airshipx!, airshipy!, airshiplayer!) if(airshipx! == followx!) { if(airshipy! == followy!) { over() } } <!--er2--><!--r3--></span><!--er3-->

This is assuming you are using TK3, and you don't mind using the generic game over command.
Title: (no subject)
Post by: Aminaga on May 14, 2005, 09:12:20 AM
Huh? This topic is dead, and also, I'm not using TK3. (Not just yet at the least.)