• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

 Suggestion: Path endaction script

GMWolf

aka fel666
The suggestion is simple: In the endaction parameted of path_start, you could be a ble to supply a script to be executed as the end action.

In order to retain the current endaction, the ascociated numbers of the current endactions would be made negative. such that any positive number must be reffering to a script.

This would allow users to more easily define their own actions at the end of paths, without needing to continually check if the end of the path is reached.
 

Mick

Member
without needing to continually check if the end of the path is reached.
You can use the "end of path" event for this. I agree with you though, it would be nice to be able to supply a script to path_start, I actually thought the endaction parameter was supposed to be used for that when I first started using paths in GMS 1.x.
 

GMWolf

aka fel666
You can use the "end of path" event for this. I agree with you though, it would be nice to be able to supply a script to path_start, I actually thought the endaction parameter was supposed to be used for that when I first started using paths in GMS 1.x.
Duh, end of path! I completely forgot!
Still, I would like to see this implemented!
 
R

rui.rosario

Guest
With the end of path event you can emulate this. Just create a script that receives the path to create and the script index to execute and store that in a goal map (add the object / instance id to it as well if several instances / objects can have different paths regardless of object type). Then you can create a path instance that handles the path end event with the correct script and inherit from it. Or create a script called path_perform_end() or something and call it in every end path event. (on mobile, hope I made myself clear)
 

GMWolf

aka fel666
With the end of path event you can emulate this. Just create a script that receives the path to create and the script index to execute and store that in a goal map (add the object / instance id to it as well if several instances / objects can have different paths regardless of object type). Then you can create a path instance that handles the path end event with the correct script and inherit from it. Or create a script called path_perform_end() or something and call it in every end path event. (on mobile, hope I made myself clear)
Yeah you did :)
As I mentioned above I completely forgot about the path end event when I wrote this- derp.
 
R

rui.rosario

Guest
if it weren't for this thread I'd have forgotten about it as well xD
 
Top