Page 1 of 1

add "edit path frame"

PostPosted: Wed Jan 16, 2008 4:51 pm
by stevenp
being able to edit your path frame would be very time saving,

every time i want to make an ajustment to i have to delete it and make it again,

Re: add "edit timer"

PostPosted: Wed Jan 16, 2008 11:38 pm
by Game A Gogo
Agreeded

Re: add "edit timer"

PostPosted: Sat Jan 19, 2008 8:41 pm
by Troodon
Also path frame edit. :)

Re: add "edit path"

PostPosted: Sun Feb 03, 2008 11:57 am
by Thanx
Would be nice & usefull, but sure would send Makslane to work... :)

Re: add "edit path frame"

PostPosted: Wed Jun 25, 2008 10:32 pm
by feral
this is an old thread but I am glad to see it revived, as it relates directly to what i am currently working on.

see the "sonic paths" stickto() function
viewtopic.php?f=6&t=5851
the next version will allow you to distinguishes between different actors, so

you can have a hidden actor ie: a path shaped actor (think of a curly line like a path, but drawn using pixels ( or drawn with a canvas routine)

then using the stickto() function your actor can follow the path, BUT, CAN change speed/stop/reverse, and/or detect "nodes" that are set along the path where a particular action should occur eg:

every ten or so pixels stop, drop a bomb, then continue along path
if hit "node" then change animation and shoot missile...
if hit "end node" change direction and return along path.
etc etc

ie: superpaths

please check out the stickto() function and tell me what you need to use it as a path/ and or anything else that needs improving as i think eventually it may become a very useful tool for many things.. ( not just hedgehogs :lol: )
(and please paste any ideas on that the thread not this one....)


feral

Re: add "edit path frame"

PostPosted: Wed Jun 25, 2008 11:32 pm
by stevenp
sounds cool

wait a second...

does this mean you can make a "chain lightning" spell using this method?
( diablo 2 or warcraft 3 chgain lightning )

Re: add "edit path frame"

PostPosted: Thu Jun 26, 2008 2:10 am
by feral
stevenp wrote:sounds cool

wait a second...

does this mean you can make a "chain lightning" spell using this method?
( diablo 2 or warcraft 3 chgain lightning )


what ? with the superpaths ? if so... i dunno... 1 have never seen "chain lightning effect"
tho i am sure there is easier ways..??
is there sample somewhere of what you need ?
feral

Re: add "edit path frame"

PostPosted: Thu Jun 26, 2008 3:12 am
by stevenp
i dont need this but i was just curious

its basicaly a connect the dots effect

Re: add "edit path frame"

PostPosted: Thu Jun 26, 2008 3:55 am
by feral
stevenp wrote:i dont need this but i was just curious

its basicaly a connect the dots effect



ahh.. I see... no i wouldn't use this for that sort of effect..

just off the top of my head
I would probably use some form of moveto and trail effects

ie: move to nearest monster ( with random changes in direction to simulate lightning..) but leaving glow trails behind ...also to simulate lightning trails

then after hitting first monster, deduct energy, then move to next closest monster etc..

I could do a demo if that doesn't make sense
feral

Re: add "edit path frame"

PostPosted: Thu Jun 26, 2008 11:10 am
by stevenp
its ok, actualy, this sounds very useful, so i might look into with more detail in the next few weeks

Re: add "edit path frame"

PostPosted: Sun Jan 09, 2011 4:12 am
by tintran
I was thinking about this same thing(the ability to jump onto a path at any point, and reverse and change speed I was searching for terms like dynamic paths and didn't see anything).
And the best i could come up is this:
:arrow: have an actor follow a path (for example of 50 frames) then at each step, record that actor's location. (i guess this can be done outside of the view).
when actor finishes that path, have her call a method to record this path's size.
Then once we have this recorded path with all the locations,
we can then tell others actors to follow the recorded path
:arrow: with new framesize which allows for speed
:arrow: specify which frame we want to jump on that recorded path (relative to the new specified framesize)
:arrow: and a direction to follow (1 means forward, -1 means backward, 0 means stop)
:arrow: similar to changing Path to none, we can detach the actor from following the recorded path
here's a ged demo of that.
dynamicpaths.png

dynamicPath.zip
(149.53 KiB) Downloaded 163 times

all the recording and follow paths are in the _path.c (a global script).
functions that can be used are
pathClear(); // maybe call it from view Create Actor to initialize everything to zeroes
pathRecordStep(int whichPath); // to be called from the recorder's Draw Actor's event with an index
pathFinish(int whichPath); // to be called from the recorder's Path Finish event with the same index
for example, set an actor to start out with a path that have this in the Draw Actor
Code: Select all
    pathRecordStep(0,x,y    );
   

0 is the index we're recording it to, currently i just have 100 in there (change it to anything you wish).
then in Path Finish have
Code: Select all
pathFinish(0);
 


once we have this recorded path.
we can use
pathFollow(int whichPath, int startStep, int frames, char cloneName[], int pathDirection)
for example in another actor's Draw Actor event, have it call
Code: Select all
   pathFollow(0, 30, 120, (char*)clonename, 1, &x, &y);
 

to follow the recorded path
at a quarter the way
at 120 frames, and 1 indicates forward
or have it call
Code: Select all
pathFollow(0, 3, 6, (char*)clonename, -1, &x, &y);

to follow the same recorded path (index 0) with only 6 frames and in the opposite direction.

so the last parameter can be 1,0, or -1 so we can have a parameter.
and another method is detachFollower(char clonename[]);
have it call from wherever you want to remove it from the follower's list
Code: Select all
     detachFollower((char*)clonename);
 

just see the code. (i keep changing it).
Feel free to edit as you see fit or please do share, if you find a better way.
ponder: if the pathFollow method can be called from Create Actor event
instead of in calling it in the Draw Actor event and then create some timer to move the actor that's been added (this would seem cleaner but i think that's for another day).