Home   Help Search Login Register  

Author Topic: Created soldier wont walk  (Read 1053 times)

0 Members and 1 Guest are viewing this topic.

Offline Killzone

  • Members
  • *
  • War is the true Enemy
Created soldier wont walk
« on: 15 Apr 2005, 17:04:39 »
Hi,  ;D

Can someone tell me why this unit refuses to walk to it's destination


This is what I am using

"civilian" createunit [getpos object 64690,group (leader),"b = this",1,"Private"];
b setspeedmode "limited";
b setbehaviour "careless";
b setcombatmode "blue"

~2

b domove (getpos (object 65022))

He always runs to this position. I want him to walk.  I dont get it because if I use waypoints in the editor and set the unit to limited and careless he will walk.

Thanks for the help
« Last Edit: 15 Apr 2005, 17:05:19 by Killzone »
"Everyone dies so deal with it and move on"

                                                      ME

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re:Created soldier wont walk
« Reply #1 on: 15 Apr 2005, 17:24:04 »
Just a thought: try putting a delay after the createunit command (before the next command).

EDIT: Confirmed, doesn't help.
« Last Edit: 15 Apr 2005, 19:15:02 by Baddo »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Created soldier wont walk
« Reply #2 on: 15 Apr 2005, 17:28:08 »
i suspect it's something to do with the domove command. i've tried it here and the same happens. putting a firearm on the civvy's back slows him down a little, but he still jogs.

if you want the loon to walk, waypoints seem to be your only option  :-\

Offline Killzone

  • Members
  • *
  • War is the true Enemy
Re:Created soldier wont walk
« Reply #3 on: 15 Apr 2005, 17:42:08 »
If I use waypoints I will have to have the unit already on the map. I dont want that. I am working on idea for a city with life. When you get close to the city the script activates and creates life in the city making it appear that the city is alive with moving people and vehicles. Once you leave the city everything is deleted and on to the next city where a new script (for that town) is activated.  This will give the illusion of life in all the towns without the lag of actually having ALL those units on tha map at the same time.

I just dont want a city full of running people, it tend to make them look crazy  ;)

There must be a way to get these morons to walk. So close yet so far away
"Everyone dies so deal with it and move on"

                                                      ME

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re:Created soldier wont walk
« Reply #4 on: 15 Apr 2005, 18:26:09 »
If I use waypoints I will have to have the unit already on the map. I dont want that. I am working on idea for a city with life. When you get close to the city the script activates and creates life in the city making it appear that the city is alive with moving people and vehicles. Once you leave the city everything is deleted and on to the next city where a new script (for that town) is activated.  This will give the illusion of life in all the towns without the lag of actually having ALL those units on tha map at the same time.

I just dont want a city full of running people, it tend to make them look crazy  ;)

There must be a way to get these morons to walk. So close yet so far away

If you put a group on the map in the editor, give it waypoints and name the group and then delete all units in the group, you can add units to the group later using the createunit command (using the group name you gave to it, put it straight to the createunit command) when you need them and then they will follow the original waypoints.

Waypoints are not deleted when you delete the units from the group.

Try it.
« Last Edit: 15 Apr 2005, 18:31:52 by Baddo »

Offline 456820

  • Contributing Member
  • **
Re:Created soldier wont walk
« Reply #5 on: 15 Apr 2005, 19:46:21 »
or you can put a unit on the island somewhere out of way and give him waypoints and when you want him to show use
Code: [Select]
player_name setpos (getpos gamelogic_name)that works for me but you must change the name of the game logic acording to the name you have given it same with the player.
also i think that line only works for game logics dont think it works for markers

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re:Created soldier wont walk
« Reply #6 on: 15 Apr 2005, 19:56:41 »
or you can put a unit on the island somewhere out of way and give him waypoints and when you want him to show use
Code: [Select]
player_name setpos (getpos gamelogic_name)that works for me but you must change the name of the game logic acording to the name you have given it same with the player.
also i think that line only works for game logics dont think it works for markers

No, no, no. Not good. The method I told works perfectly and the units are not stressing the computer when they are not needed. Just create the units to an empty group with waypoints and delete them when the player goes far enough.

Remember that the player might use binoculars/scoped weapon to look to the town so it needs some distance. Maybe using the setviewdistance command could be useful here.

Offline 456820

  • Contributing Member
  • **
Re:Created soldier wont walk
« Reply #7 on: 15 Apr 2005, 20:03:03 »
but if you delete all the units in the group that would delete the waypoints and the whole group and codes will of vanished unless you have a unit in the group unless i have misread of it some other way
if i havent misread i think you could also use the condition of precense i think set it to false that might work
plus my way does cause lag but depends how many units you want to setpos

UNN

  • Guest
Re:Created soldier wont walk
« Reply #8 on: 15 Apr 2005, 21:06:22 »
Quote
but if you delete all the units in the group that would delete the waypoints and the whole group and codes will of vanished unless you have a unit in the group unless i have misread of it some other way

No, waypoints are assigned to a group, and groups once created cannot be deleted. You can kill or delete all the guys in a group, but never the group itself. Baddo is correct, if you dont mind setting up the group first in the editor, and perhaps if you want them to follow the same path all the time, it's the best way.

The original problem is down to DoMove, this always moves the unit at normal speed. If you use the move command you can change the speed the way he originaly wanted:

Quote
b move (getpos (object 65022))
b setspeedmode "limited"

At least it works this way with aircraft.

Offline Killzone

  • Members
  • *
  • War is the true Enemy
Re:Created soldier wont walk
« Reply #9 on: 15 Apr 2005, 21:26:57 »
Thanks for all the help in trying to solve this it is appreciated.

Even though I still have to have "some" units on the map I can live with that.

UNN has the idea I am going to use. I will use the same units to give life to all the towns.

Thanks now I can go forward
"Everyone dies so deal with it and move on"

                                                      ME