Can someone tell me how i would go about making a spike trap, like the ones found in the latter Legend of Zelda games on the N64? What i mean is how to make a trap that slides back and forth to given points. If you still don't know what i mean, check out this game:
http://games.byond.com/hub/Unowuero/TheGauntlet
They're the gray things that slide back and forth. Thanks in advance
--Reinhart
ID:169095
Jul 29 2005, 7:49 am
|
|
Jul 29 2005, 7:52 am
|
|
Perhaps the step() and bump() procs might be of use.
|
In response to Sinoflife
|
|
well, that half i belive i know. more of the problem is how would i keep it from simply moving past the point i want it to end at, rather than doing what i want it to do and move in the other direction once it reaches the endpoint?
|
From the looks of it, they probably slide NORTH until movement fails, and then switch direction SOUTH and repeat.
What you could do, as an alternative, is have each spike trap hold a variable of max_y and min_y and then in the map editor you could assign individual instances their own values to max_y and min_y, as well as an initial direction. Then, say for instance, you could do something like this: obj As another alternative, you could set a range variable and a curr_steps variable, and on each step increment the curr_steps and check if it == range. Hiead (hope I didn't make any confusion or accidental errors) |
In response to Hiead
|
|
But, saying i use the first example, where you would check if movement fails, how exactly would i CHECK if movement fails?
yeesh. someone should make a demo on this stuff.0.o |
In response to Reinhartstar
|
|
Reinhartstar wrote:
But, saying i use the first example, where you would check if movement fails, how exactly would i CHECK if movement fails? If what Hiead typed was too hard for you try a simpler method.THis method doesn't allow you to set range_max and range_min but it does check for movement distruption. /obj/spike_ball |
obj |
In response to Ol' Yeller
|
|
Ol' Yeller wrote:
obj Just one thing. Consider what happens when the spiketrap bumps a mob. A small bug, yet it could cause considerable problems. Hiead |
In response to Reinhartstar
|
|
Reinhartstar wrote:
But, saying i use the first example, where you would check if movement fails, how exactly would i CHECK if movement fails? Look up " . " Hiead |