Get points when jump over
Hi , I'm making a new game and now and I have a big problem. I want to get the score +1 when i jump over another actor.I already know how to get score +1 but the problem is that i don't now how to get it when my main actor jump over another actor . I've already tried change attribute x and y to self position every 0.1 sec on my "jump over" actor and then the same on my main actor but instead x2, y2 and then if x2 and y2 is > or < than x or y change attribute score to +1. I'm probably thinking completely wrong... any ideas?
Comments
If collision with invisible actor
points + 1
Cheers
TheBoss_123
JumpEnemeyPosX
JumpEnemeyPosY
And constrain the jump enemies Self Pos X and Self Pos Y to those global attributes
Then in the player actor set up a rule like:
attribute Self Pos X > Jump EnemyPosX
attribute Self Pos Y > Jump EnemyPosY
Chg attribute Score to true
Then setup up a score rule somewhere else:
When Score = true
Chg Attribute TotalScore to TotalScore + 1
The reason I did it like that is because you'll probably have more than one instance of this actor and it might confuse GS with the global attributes.
The other alternative is to do like the first guys reply, each enemy spawns an invisible collision box above them which is constrained to the X Pos and Y pos (+ how ever many pixels above you want it ot appear), then when the player collides with the collision box it adds a score.