Mystic Software Forums
Mystic Software => General Discussion => Topic started 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?
-
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.
-
Accually, I wan't it to follow the hero/escape pod, and run the game over program if it runs into poor Aminaga.
-
Well, that's what I said.
: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.
-
Hmmm, I'll try that out.
-
Glad to be of service Razz
-
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...)
-
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... <_<
-
Give me an example of the code, and I'll try it out!
-
Maybe later...I'm busy.
-
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
-
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.
-
Huh? This topic is dead, and also, I'm not using TK3. (Not just yet at the least.)