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?
Help with lua
Moderator: Moderators
-
somen00b
- Private Recruit
- Posts: 16
- Joined: Wed Dec 08, 2010 7:12 pm
- Projects :: No Mod project currently.
Help with lua
Last edited by somen00b on Thu Jun 09, 2011 11:16 am, edited 4 times in total.
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Help with lua
Spawned vehicles have issues. [RDH]Zerted and I were working on a vehicle-only mode a long time ago, but we found that lua-spawned vehicles that players were forced into would have no primary weaponry. So unless it's a podracer or commuter vehicle (no weapons) it's not going to be worth it.
