help with the player sliding

Game Editor comments and discussion.

help with the player sliding

Postby nightFall16 » Tue Aug 23, 2016 7:58 pm

i have tis which the player should be able to slide on the ground but when he start sliding he never stops
so maybe it's has something to do with my code please some one tell me what i'am doing wrong
Attachments
Game data.zip
(446.87 KiB) Downloaded 141 times
User avatar
nightFall16
 
Posts: 41
Joined: Wed Jun 22, 2016 4:24 am
Score: 2 Give a positive score

Re: help with the player sliding

Postby Zivouhr » Thu Aug 25, 2016 4:51 am

I don't have a PC, as it says I need that newer version of Game Editor to read the file, but if I had a character that was sliding, I have to create a way for it to stop, and the best way to do that is with a path finish, provided there was a path to get the character started.

Since I can't see what the game is like and what the intent of the sliding is for, I can only give some very basic advice:

Let's say the actor collides with something that cause it to begin sliding on a path.

Actor/Add Collision Event/with Any Side of Actor 2/Script Editor
Variables/change path/Event Actor/path/slideright (create the path when prompted)/Axis/x axis

Then, to stop that path from repeating and stopping:
Actor/Add Path Finish/slideright/script editor/
ChangePath("Event Actor", "(none)", X_AXIS;

That's the general idea anyway. You can add conditions to that through variables, but that gets a lot more complex to explain.
I would help more, but am very booked up with other projects including my own game editor game project. Best of luck! 8)
City of Rott Game created on Game Editor http://cityofrott.wordpress.com/
User avatar
Zivouhr
 
Posts: 549
Joined: Sat May 17, 2014 2:12 pm
Score: 59 Give a positive score

Re: help with the player sliding

Postby nightFall16 » Thu Aug 25, 2016 6:13 pm

thanks man but i already did what u said but the path finish thing is not stopping the player at all and the player is not repeating the path
he jus keep sliding for ever , then i tried to make an actor at the end of the slide (by the way the slide is down hill ) and used angle fun- and directional_velo-
to make the player slide down to the actor and when it collides it should stop but again the same problem (i thing it could be from my draw actor code i usually animate my player from only draw actor without any key down or up ) , and by the way the angle way worked so good in another testing game with only ke right and key left with no gravity
i was thinking that some one can read my code and tell me what is wrong
an hey one more Q when the player is colliding the slide which side he is colliding (top or right ??) and do the phesical response affect the sliding ?? somehow ? cuz in a game wit no gravity (then no phisical response needed ) it works so great
User avatar
nightFall16
 
Posts: 41
Joined: Wed Jun 22, 2016 4:24 am
Score: 2 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest