Rules ??
PowerKalisto
Member Posts: 34
all the rules are here but i don't understand why he does'nt wanna jump... get a look to the Jump Rule :
_______________________________________________________
when all conditions are valid:
actor receives event - key - space - is down
atribute - self.On the ground is true
Change atribute: self.on the ground to: False
Timer
every 0.1 sec (X) run to completion
accelerate
direction 90 relative to scene ( I tried ''actor'' too )
acceleration 3000
and THATS don't work tell me please where is my mistakes
_______________________________________________________
when all conditions are valid:
actor receives event - key - space - is down
atribute - self.On the ground is true
Change atribute: self.on the ground to: False
Timer
every 0.1 sec (X) run to completion
accelerate
direction 90 relative to scene ( I tried ''actor'' too )
acceleration 3000
and THATS don't work tell me please where is my mistakes
Comments
_____________________________________________________
When all conditions are valid
actor receives event overlaps or collides with actor type immovable walls
actor receives event overlaps or collides with actor type player
Rule Motion
when all conditions are valid
attribute self motion linear velocity Y < 10
attribute self motion linear velocity Y > -10
Change attribute self on the ground To: 1
Err, or is that just a new euphanism for something... ;-)
RULE 1:
when self.onTheGround = true
SUB-RULE 1A: (inside RULE 1)
When key - space - is down (or any other user input trigger)
change velocity - direction 90 (relative to actor or scene) with speed 300 (or whatever speed you need to get the desired gameplay effects)
change Image to "my Cool Jumping Sprite Graphic"
drag = 50 (or whatever drag value is needed to slow the actor down properly in your game)
self.onTheGround = False (must be last in the list otherwise you will disable RULE 1 if positioned earlier in this list and the sub-rule will not execute properly)
RULE 2: (SEPARATE FROM RULE 1)
when "myJumpingActor" (self) overlaps or collides with "theGroundActor" (or any targets needed)
OR when "myJumpingActor" (self) overlaps or collides with "theHigherPlatformActor"
OR when "myJumpingActor" (self) overlaps or collides with "someOtherActorToLandOn"
change Attribute self.onTheGround = True
change Velocity to 90 direction and 0 speed
drag = 0
change image to "my Cool Standing On the Ground Sprite Graphic"
SYNTHESIS NOTES:
Here...no timers are needed...which is better for the processor
I recommend you change your "onTheGround" attribute name to "readyToJump"...which is more appropriate to the attribute's use...since it is a boolean trigger switch.
Also, placing the jump switch inside the other boolean check rule allows you to make that spacebar trigger work along side other rules when the actor is "on the ground"...such as running left or right.