Question on how to make an actor jump properly?
kajuto
Member Posts: 314
Hi!!! thanks in advance and i made this actor and 2do actor that i can jump over this one, but after that i can't jump again, it like stick to the actor with the code below. How can i make the 2do actor to jump again?
constrain X position to AAA*cos(self.time*BBB)+CCC
How it works:
AAA = the amount of movement.
BBB = the speed of the movement.
CCC = the centre (orgin) of the left to right movement.
constrain X position to AAA*cos(self.time*BBB)+CCC
How it works:
AAA = the amount of movement.
BBB = the speed of the movement.
CCC = the centre (orgin) of the left to right movement.
Comments
i recently made a actor that move from x value to another x value (left to right & viceversa) the code i used is this:
Timer:
every 1.5 seconds run to completion
Rule:
Att : selfpositionX = 531.264
-Change Att
-selfright&left to false
Rule:
Att: selfright&left is true
- Interpolate
- selfpositionX to 531.264
-duration 1 functon: linear
Rule:
Att: selfpositionX=808.502
-Change Att
-selfright&left to true
Rule:
Att: selfright&left is false
- Interpolate
-selfpositionX to 808.502
-duration 1 second function: linear
I just want to move from one side or the other and up and down for another platform, because i plan to use 2 type of platform, one up and down viceversa; and another left to right viceversa. Also when i jump on top of it , i can jump again , because when i jump over, it stick to it.. =-( help please and i appreciate
constrain X position to AAA*cos(self.time*BBB)+CCC
How it works:
AAA = the amount of movement.
BBB = the speed of the movement.
CCC = the centre (orgin) of the left to right movement.
Take some screen shots of the code + make a video of the problem.
2) i have a platform that move left and right using this code:
Contraint Att
- Self.position.X to 100*(self.Time*20)+450
the prob is this: when the #1 actor(hero) jump over the #2 actor i tried to follow it movement, which it find. the problem is here, once i'm over the #2 actor i can't jump again to another platform
: (
I have a Score display , that i want to reset to 0
the coin that collect i use this code:
Rule (overlap or collide with hero)
-change att
-game.colletacableitem to game.collectableitem+10
- destroy
each time, i collected the coin, it's counted me +10, how can i reset each time i play the first level or even i restart the scene
Change Attribute: game.colletacableitem to 0
again
there is a maybe a stupid question, but till now i don't know how i calculate the scene x or y distance for example, the platform below:
kajuto said:
1) . . . using this code:
Contraint Att
- Self.position.X to 100*(self.Time*20)+450
i don't know, how i should know the x value or y value, for the 450 for example, because sometime i want to move from let say x=200 to 800 it move from another x value instead of where i want it to be
Does this make sense ? . . .
So . . . AAA*cos(self.time*BBB)+CCC
AAA = the amount of movement.
BBB = the speed of the movement.
CCC = the centre (orgin) of the left to right movement.
"for example, because sometime i want to move from let say x=200 to 800 it move from another x value instead of where i want it to be"
200 to 800 = 600 pixels of movement (AAA)
The centre of 600 pixels is 300 pixels.
So to get 200 to 800 . . . . .
300*cos(self.time*BBB)+500
. . . . . . . . . . . . . . . . . . . . . .
Why 300 ?
You want 600 pixels of movement - 300 left and then 300 right.
Why 500 ?
When you move 300 pixels left (from x=500) the actor will go to x=200.
When you move 300 pixels right (from x=500) the actor will go to x=800.
1) Do know any site that explain all the expression that GameSalad use like cos, sin , random, ect ect ??
2) How I calculate the distance or pixel where i put an actor to another segment in the scene editor ? For example Autodesk Maya or other program have a Guide Rule so I know where I'm putting a actor and know the distance, ect...
+ Wikipedia.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Cheers Frying :@) Studios !
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
To place an actor precisely at X=200 . . . . . double click the actor in the scene and change it's X position value to 200 in the attributes panel on the left hand side of the screen.
Tyran. U know the code that u help me AAA*(selftime*BBB)+CCC ,Supposely I use that okay... I don't the platform to move until the hero actor is close enough to the platform then he can move. Is like the tutorial made by tshirtbooth using magnitude..
i want when the hero actor is very close to the platform, then the platform start to move down so the hero can walk on top of it...
Before I answer that, can you answer me this question, I want to know if I can use capital letters on this forum, not just one at the start of the word (like: This) but I want the whole word to be in capitals, do you think this is possible, have you tried anything like this ?
?