HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Select starting waypoint for follower  (Read 2097 times)

Prometheus2012

  • General Accounts
  • *
  • Posts: 664
    • View Profile
    • Exile-Online
Select starting waypoint for follower
« on: Mar 22, 15, 05:44:35 PM »

Yo,

I have made a path and some waypoints. Ive added a path follower. I notice on the properties for the follower that i can somehow make it start at a certain waypoint. Anyone know what data goes in here? Ive tried putting in 1,2,3 etc as i thought it might just do it that way. ive also tried putting into the GUID of a specific waypoint but that says its invalid number.

Basically im creating a path with some waypoints and several followers on 1 path. Each follower will have a car or vehicle attached to it. I cant have them all start at the same point as they would be inside each other as they all go the same speed. I also cant have them go different speeds because if they overtake each other it would look strange as they just pass right through each other.

So i would need a follower to start at say the first waypoint, the second follower to start at a waypoint further along etc. Cheers.

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Select starting waypoint for follower
« Reply #1 on: Mar 23, 15, 10:57:04 AM »

I would take a look at space ref, it's all about paths and waypoints and points along the paths.
Logged

Prometheus2012

  • General Accounts
  • *
  • Posts: 664
    • View Profile
    • Exile-Online
Re: Select starting waypoint for follower
« Reply #2 on: Mar 24, 15, 10:36:47 AM »

Does anyone know the simple answer for this? Going trundling around the Space ref looking for something that i dont know what im looking for is pretty unproductive and a big waste of time if someone has the knowledge and could just post a quick answer here.

EDIT: I have gone into the space ref world and examined every path and path follower that i could see. None of which gave me a clue as to how to make a path follower start at a different waypoint along a path other than the first one.
« Last Edit: Mar 24, 15, 10:53:03 AM by Prometheus2012 »
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Select starting waypoint for follower
« Reply #3 on: Mar 25, 15, 06:59:59 AM »

just to test, use the GetStartWaypoint(path as noderef) as ID

which will return the starting waypoint ID and use it in the waypoint and see, or use GetStartWaypoint(path as noderef) as ID

Then get nextWaypoint, as a way to test having it start on not the starting one, or use the end one.

That way you can see if the follower property works out.

I'll test it when i get home tonight.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Select starting waypoint for follower
« Reply #4 on: Mar 25, 15, 10:15:02 AM »

I just did some simple testing, and the StartingWaypoint property of a follower works fine.  Based on testing, it is a 0-based index where 0 means the first point, 1 is the second, etc.

It is used when the follower is first started, as well as when ResetPathFollower() is called.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Select starting waypoint for follower
« Reply #5 on: Mar 25, 15, 10:20:44 AM »

On a quick side note, in testing I also used the instructions at Camera Commands-Setup & Execution, but I notice that in the MasterCamera script there is a comment "THIS SCRIPT has BEEN DEPRECATED in FAVOR of CameraControllerClassMethods."  A small point, but at some time the wiki instructions could be updated there to use the CameraController class.

That being said, MasterCamera still works fine.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

Prometheus2012

  • General Accounts
  • *
  • Posts: 664
    • View Profile
    • Exile-Online
Re: Select starting waypoint for follower
« Reply #6 on: Mar 25, 15, 03:00:12 PM »

Strange. i did try setting the starting waypoint as 1, 2, 3 etc, but nothing changed. it always starts at the first waypoint.

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Select starting waypoint for follower
« Reply #7 on: Mar 25, 15, 03:18:41 PM »

Did you try calling ResetPathFollower()?
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

Prometheus2012

  • General Accounts
  • *
  • Posts: 664
    • View Profile
    • Exile-Online
Re: Select starting waypoint for follower
« Reply #8 on: Mar 26, 15, 11:48:09 AM »

Did you try calling ResetPathFollower()?

Is that something to do with coding?

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Select starting waypoint for follower
« Reply #9 on: Mar 26, 15, 09:52:45 PM »

Yes, it is an external function.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.