Help with lua
Posted: Wed Jun 08, 2011 11:31 pm
Code Console is a command in the fake console btw
So just for fun I was trying to do a couple things with the code console, here is what happened:
1. Spawn a self piloted vehicle or spawn a pilot and force him/her to pilot a spawned vehicle.
I cannot seem to simulate the self piloting that pilottype=self vehicles have when spawned from a vehicle spawn point, and creating a vehicle spawn point crashes the game. I also cannot get EnterVehicle() to work. I even tried to work with the gunships found on kamino.
2. Dynamically set up and spawn units.
After loading the ambush script via my test map's lua and typing in team parameters in game. I get the "too many dudes alive" error with ambush (I am using a path that is already in the map). I also cannot figure out correct arguments for SpawnCharacter()
edit2: update2: I'm trying to figure out why I can't make an ambush team mid-game (e.g. which variable needs to be pre-set), I don't know yet.
update 3: It appears that you can't have more units then the game prepairs for at load time. (To test this, I made an ambush team with 2 units and attempted to change it to 4 mid game, no luck. only 2 spawned.
Any thoughts?
So just for fun I was trying to do a couple things with the code console, here is what happened:
1. Spawn a self piloted vehicle or spawn a pilot and force him/her to pilot a spawned vehicle.
I cannot seem to simulate the self piloting that pilottype=self vehicles have when spawned from a vehicle spawn point, and creating a vehicle spawn point crashes the game. I also cannot get EnterVehicle() to work. I even tried to work with the gunships found on kamino.
2. Dynamically set up and spawn units.
After loading the ambush script via my test map's lua and typing in team parameters in game. I get the "too many dudes alive" error with ambush (I am using a path that is already in the map). I also cannot figure out correct arguments for SpawnCharacter()
edit2: update2: I'm trying to figure out why I can't make an ambush team mid-game (e.g. which variable needs to be pre-set), I don't know yet.
update 3: It appears that you can't have more units then the game prepairs for at load time. (To test this, I made an ambush team with 2 units and attempted to change it to 4 mid game, no luck. only 2 spawned.
Any thoughts?