Unfotunately, I have run into another problem..... Getting a car to teleport, and to move to another point.
Now there are a few men (drivers for the vehicles) with this in their init field:
this moveindriver redcar
the names for each of the vehicles are: redcar, greencar, yellowcar, bluecar, sport1, sport2, and carsm.
Each of the drivers for the vehicles have the same name, but with d (for driver) at the end.
So the code above would be for redcard, putting him into redcar which is a skoda red.
Sport1 and sport2 are sportscars, and carsm is car small.
So here is the code that detects where the player is, and randomly selects a car to put near the player.
\\This basically detects which point the player (actme) is closest to.
? ((actme Distance south) <=20) : goto "south"
? ((actme Distance patwest) <=20) : goto "west"
? ((actme Distance east) <=20) : goto "east"
? ((actme Distance slapy) <=20) : goto "slap"
? ((actme Distance air) <=20) : goto "air"
? ((actme Distance bridge) <=20) : got "bridge"
? ((actme Distance soro) <=20) : got "soro"
#south
\\this randomly selects a car, and moves it to the said locations. I only used the south one, all the other ones \\are basically the same except for the positions. The other ones are air1, air2, bridge1, bridge2 and so forth. \\all the positions are game logics (south1, south2)
\\ignore the scripts executed for each car, thats for later in the game, no problems there.
_NUMBERS = 7
_NUMB = random _NUMBERS
?(_numb < 1): actme exec "patrol1\red.sqs"; redcar setpos getpos south1; redcard setpos getpos south1; [redcard, 1] setwppos getpos south2; goto "xit"
?( (_numb > 1) and (_numb <= 2) ): actme exec "patrol1\green.sqs"; greencar setpos getpos south1; greencard setpos getpos south1; [greencard, 1] setwppos getpos south2; goto "xit"
?( (_numb > 2) and (_numb <= 3) ): actme exec "patrol1\yellow.sqs"; yellowcar setpos getpos south1; yellowcard setpos getpos south1; [yellowcard, 1] setwppos getpos south2; goto "xit"
?( (_numb > 3) and (_numb <= 4) ): actme exec "patrol1\blue.sqs"; bluecar setpos getpos south1; bluecard setpos getpos south1; [bluecard, 1] setwppos getpos south2; goto "xit"
?( (_numb > 4) and (_numb <= 5) ): actme exec "patrol1\sport1.sqs"; sport1 setpos getpos south1; sport1d setpos getpos south1; [sport1d, 1] setwppos getpos south2; goto "xit"
?( (_numb > 5) and (_numb <= 6) ): actme exec "patrol1\sport2.sqs"; sport2 setpos getpos south1; sport2d setpos getpos south1; [sport2d, 1] setwppos getpos south2; goto "xit"
?( (_numb > 6) and (_numb <= 7) ): actme exec "patrol1\carsm.sqs"; carsm setpos getpos south1; carsmd setpos getpos south1; [carsmd, 1] setwppos getpos south2; goto "xit"
#xit
exit
So after this is executed, sometimes theres a car there, and sometimes theres not. And when there is, he doesn't move, even though I set a waypoint for him. so is there a teleporting issue, when I tell the driver and the empty car to move?
Sorry if this is a little confusing. If you have any questions, obviously feel free to ask about this.
Thanks for taking the time to read it.
-Mad Pup