DogRed9
  • DogRed9
  • 56% (Neutral)
  • Private Topic Starter
19 years ago
What I want to do is script a car to follow a set of waypoints, stop, then follow another set of waypoints, and stop, and keep going in a loop.

Also... how would I make the computer garrison buildings?
Sponsor
fervid
  • fervid
  • 60.5% (Friendly)
  • Private
19 years ago
Under the [Team] and [Unit] sections for script actions you will find Garrison options. You'll probably want either named unit or create a team then add the units you want to Garrison to it. As for Stopping and Starting...that I'm wondering myself. I tried it myself playing around hoping maybe the waypoints would work like a Railroad, but creating Station, Disembark, etc just crashed Generals and I'm guessing caused the map to save wrong as I found out with help here I had 20+ Water Areas I didn't create.


Added:
Hehehe, I think I found it:
Team and Unit in the Conditions also have a test for Reaching End of Waypoint Path, when end of one have it start the next and when end of last have it start the loop over by going to first. You'll need to take the check off for deactivate on success as they will need to keep checking to keep the loop going. I wouldn't make many of these then since they will all be running... You'll probably need some type of timing in between too since they will run one after the other and still appear to be in motion.
DogRed9
  • DogRed9
  • 56% (Neutral)
  • Private Topic Starter
19 years ago
Ive tried the Unit one, didnt work... sadly :(
I then noticed one that checked if a unit was in an area, so I tried that too... and again, it didnt work... theres no reason it shouldnt, has anypone seen a map lke this?
fleetatks
19 years ago
Name your unit(s) (Cars) in the object property box, then place a waypoint and create a path for your car (if they're too close together the car will ust go in circles between them) and Click on one of the waypoints and give it the label "PATH" then the waypoints should have a red thing under they're green name that says "PATH"

Then go into scripts and do this:

If
'true'

then
(unit->path->set unit to fllow a waypoint path)
Then try to find the action that looks something like "Set unit to stop at a waypoint" or maybe "Set a train to stop at a station" Sorry that i ca't give you xact path, but i dont got worldbuilder on this comp.
Email me if you ever need help (edited signature November 6th, 2014)
DogRed9
  • DogRed9
  • 56% (Neutral)
  • Private Topic Starter
19 years ago


Name your unit(s) (Cars) in the object property box, then place a waypoint and create a path for your car (if they're too close together the car will ust go in circles between them) and Click on one of the waypoints and give it the label "PATH" then the waypoints should have a red thing under they're green name that says "PATH"

Then go into scripts and do this:

If
'true'

then
(unit->path->set unit to fllow a waypoint path)
Then try to find the action that looks something like "Set unit to stop at a waypoint" or maybe "Set a train to stop at a station" Sorry that i ca't give you xact path, but i dont got worldbuilder on this comp.

Fleetatks wrote:


I cant find anything like that... could you please look for it next time youre on a computer with it please 😃
4_ACES
  • 4_ACES
  • 64.25% (Friendly)
  • Private
19 years ago
well i tried to garrison but you have to have a comp in and theres more scriping involed so your outa luck
when pushed
open fire
DogRed9
  • DogRed9
  • 56% (Neutral)
  • Private Topic Starter
19 years ago


well i tried to garrison but you have to have a comp in and theres more scriping involed so your outa luck

4_ACES wrote:


ya, I said screw it and made militia and had them garrison it... (defending tech buildings)
But the real enemy did garrison a building ONCE, out of 2 enemies and 4 buiildings to garrison each, one team garrisoned one building...
now all i want is the car part :/
4_ACES
  • 4_ACES
  • 64.25% (Friendly)
  • Private
19 years ago
alright i now know what to tell you
first make waypoints name them like car path 1 but name them all the same but number them then put a car there name it then go into the sripts menu
go to unit, them move, them tell unit to follow exact waypoint path and choose the path and there you go

if you have problems just reply again
😁
when pushed
open fire
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
19 years ago
4_ACES, you completely missed the point that what he wanted to know was how to make it stop at specific points...
UserPostedImage 
DogRed9
  • DogRed9
  • 56% (Neutral)
  • Private Topic Starter
19 years ago
cmon people, one of you HAS to know how to do this... I mean... its gotta be possible :/
fervid
  • fervid
  • 60.5% (Friendly)
  • Private
19 years ago
Why is everyone thinking so deep? Waypoints don't need to loop, just make a path that stops??? Tell it to follow it, then when it gets to the end (To be determined by area or point or time, etc) set a timer for a few seconds, then when it expires tell it to follow another path the same way. Until it gets to the last one then tell it to follow the first path. If you can't get it to determine where the car is or if it is at the end, just time it all. Say it takes 15 sec to get from one point to the other...make a timer for 20-25 secs so the car has time to get there and stop before making it go to the next path, etc.
DogRed9
  • DogRed9
  • 56% (Neutral)
  • Private Topic Starter
19 years ago


Why is everyone thinking so deep? Waypoints don't need to loop, just make a path that stops??? Tell it to follow it, then when it gets to the end (To be determined by area or point or time, etc) set a timer for a few seconds, then when it expires tell it to follow another path the same way. Until it gets to the last one then tell it to follow the first path. If you can't get it to determine where the car is or if it is at the end, just time it all. Say it takes 15 sec to get from one point to the other...make a timer for 20-25 secs so the car has time to get there and stop before making it go to the next path, etc.

fervid wrote:


first thing I tried before coming here... doesnt work...