The Daily Click ::. Forums ::. Klik Coding Help ::. Spread Value issues
 

Post Reply  Post Oekaki 
 

Posted By Message

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
6th June, 2010 at 03:41:18 -

Hi, this might be a really stupid question but its very late and im very tired.

What i have accomplished so far is when player presses up on a ladder (its a platform game), an invisible active (a sensor) locks the player's X position to its own so the player can go up and down the ladder. that works really nice until i add a second ladder to the Screen.
Then the player jumps to the newer ladder from the where the sensor for the original ladder is. I thought if i was to spread a value in the sensor alt value it would stop this issue by identifying the active (sensors) as different objects.
i imagine its got somthing horrible to do with fast loops which i have never understood. if soo please explain to me like im a child!
Any ideas??

Thank you!

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
6th June, 2010 at 17:55:35 -

no one? I would massivly appreciate some help with this issue.

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
6th June, 2010 at 18:20:36 -

You were on the right track, though whether this works depends on your setup. It could be something as simple as spreading a value through the sensors (We'll say value A) and doing this:

Repeat while player presses up
+ Player overlaps sensor
>>Set Player Value A to Sensor Value A

Sensor Value A = Player Value A
>>Set Player X To Sensor X.

Try this crappy example: http://jollycrouton.com/Uploads/ladder.zip I spread value 1 rather than 0 because the player would lock to the first ladder if you didn't.

Edited by OMC

 

  		
  		

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
6th June, 2010 at 19:29:07 -

that will work with my setup. thank you muchness for the help. I cant believe i didnt do that anyway. It seems so very obvious! Cant wait to get that going cause that pretty much finishes my entire game engine! Thanks again

 
n/a
   

Post Reply



 



Advertisement

Worth A Click