Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Continuous Waypoint

Author
Message
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 12th May 2009 17:30 Edited at: 12th May 2009 17:31
I've created waypoints in the shape of a square and I want the object to continually go around that square instead of reversing and coming back. I've tried different permutations but the object won't even move unless I use the original follow.fpi. I've tried the following which don't seem to work:





Also how can I stop the object (which is a square box) from rotating to 'face' the way it's going?

Thanks.

Thraxas
Retired Moderator
19
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 13th May 2009 02:41 Edited at: 13th May 2009 02:47
I'm still trying to work out how to stop an object reversing the waypoint but as for no rotating you can use:


at the start of your code.

Pride
17
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Eastern USA
Posted: 13th May 2009 02:57 Edited at: 13th May 2009 03:07
Well, I made a simplistic script for my zombies that allows them to follow waypoint but go to state=1 at the end of the cycle:



A method you could use, for a box to follow and repeat a waypoint cycle AND not rotate, is the method below.



Haven't tested it, but in theory, it should work.


"Tempo non é só unha teoría, senón unha forza"
Try and figure it out
xplosys
19
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 13th May 2009 03:23
If I'm not mistaken, waypointstate=5 is the problem. Remove it from the loop.

Brian.

Plystire
22
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 13th May 2009 07:26
@Nickydude:

If the first script in your post doesn't work, you may want to enter Debug mode in FPSC (It's in the Preferences)

While debugging you can see information about the entity while it's walking around (or not walking in your case)... one of the things it shows you in the text is what "waypointstate" the entity is currently in. Sometimes the entity will enter a waypoint state of 999, but that usually only happens when you use "waypointstop"


The one and only,


Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 13th May 2009 14:59 Edited at: 13th May 2009 15:00
When I turn on debug mode the test game crashes and I have to reset the machine. I've taken a photo and attached the image of what the screen looks like in debug mode before crashing. All the game is is a 'Hallway Large' prefab and 'plinth-01' from Dark Egypt.

Tried your second script Pride but the plinth doesn't move.

Attachments

Login to view attachments
Plystire
22
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 13th May 2009 19:12
Hmmmm, I can't tell what's going on in that picture

I guess debug mode is outta the question.


Well, just to make sure that the entity isn't stuck in some sort of waypoint state that we don't know about, can you try to do a "waypointstart" for all of the waypoint states? Place the entity away from a node on the waypoint system to see if he will at least walk to the nearest one.


The one and only,


Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 13th May 2009 19:34
Quote: "Hmmmm, I can't tell what's going on in that picture."


Exactly! lol!

Quote: "try to do a "waypointstart" for all of the waypoint states"


I'll try different things to see what I can come up with then.

Thraxas
Retired Moderator
19
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 14th May 2009 00:50 Edited at: 14th May 2009 00:59
I was being driven insane trying to get something moving in a continuous 'circle'. After taking Plystire's advice and checking debug mode I used this for the follow script:



This worked perfectly on my computer with all the objects I tested and was particularly funny with the Jack o' lantern from Luke's horror pack. I didn't try it out with the norotate option but I can't see why it wouldn't work with that at the start.

Additional:
I did have to change the .fpe of the items I wanted to move to include ischaracter=1 though otherwise they didn't follow the waypoints. Is this a case of me being an idiot or can only characters follow waypoints?

Plystire
22
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 14th May 2009 09:44
I think it's not so much them having to be characters in order to follow waypoints. I think they need a specific bone structure or something weird like that.

But, making them characters is just so much easier to do than remodelling something.


The one and only,


Login to post a reply

Server time is: 2025-05-24 11:17:31
Your offset time is: 2025-05-24 11:17:31