The Daily Click ::. Forums ::. Klik Coding Help ::. Individual falling spikes?
 

Post Reply  Post Oekaki 
 

Posted By Message

J.C



Registered
  22/03/2013 05:18:14
Points
  118
5th January, 2014 at 05/01/2014 08:51:20 -

Got another curious question for you guys:

In my game I'm trying to code a row of spikes to fall individually as the player runs under them. In other words, as the player is positioned directly underneath the spike, it triggers the individual spike to fall.





 
n/a

Thiago Ladislau



Registered
  05/01/2014 18:28:22
Points
  6
6th January, 2014 at 06/01/2014 16:00:30 -

You can do this in many ways, I will write down some ideas that came into my mind.

1- Create an invisible active that is always positioned over the player, if this active ever touches the spike, trigger the further codes for falling.

2- Use distance values to measure the condition where it should fall, you can use Snipped manager for this.

 
n/a

J.C



Registered
  22/03/2013 05:18:14
Points
  118
7th January, 2014 at 07/01/2014 00:04:55 -

I just tried out the first one you mentioned, and it works well. I could also modify the invisible active to move when the player moves.

Thanks a lot Thiago!

 
n/a

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
7th January, 2014 at 07/01/2014 22:00:43 -

or..... so you dont have an extra object following you at all times on all frames, just position an invisible active as a detector directly below the area of the spikes (one object per spike) and have it so when you collide with the invisible active it will drop the spike above. to use multiple spikes you might have to spread an alterable value but it will save you from having that extra object with you all the time and only have this on the levels that have falling objects. if thats an every level ordeal, than just make an object that follows you.

 
[Game design makes my brain feel like its gonna explode.]
   

Post Reply



 



Advertisement

Worth A Click