Posted: Sun Apr 29, 2012 12:12 pm Post subject:
Making civilian vehicles stay still (*)
Here's a pretty simple way to remove the "ghost drivers" from seemingly empty civilian vehicles. It makes use of a fake weapon since unarmed vehicles try to espace when fired upon. You need to adjust the civilian vehicles in rules.ini. Here's an example of the pickup truck:
Code:
[PICK]
Primary=StayStill ; Fake weapon
Ammo=0 ; So it will never fire the fake weapon
NoAutoFire=yes ; Following 3 keys make it avoid targetting anyone
GuardRange=0
DeployToFire=yes
[StayStill]
Damage=0 ; No damage
Range=255 ; This is needed so the vehicle won't start following enemies around
ROF=80
Projectile=Invisible
Speed=100
Warhead=AP
With this the neutral vehicle will not move when it comes under fire. At the same time it can still move if you have team / script for one. I recommend using Suicide=yes for the team though, cause without it the vehicle seems to slow down when fired upon. It only slows down for a second though, then carries on with the script, but with Suicide=yes it will ignore being fired on completely. I'm not sure how it behaves if you have a script where the vehicle drives somewhere, then stays still for some time (guard command). It might try to go after the attacker if it gets fired on while on guard mission, though I'm not sure.
The only downside to all this I could notice is that if you hijack the civilian vehicle, it will display an attack cursor over enemies. But even if you order it to attack an enemy, it will simply stop and do nothing. So it doesn't really affect gameplay, just might look odd.
EDIT: Also not sure if this affects performance in some way... the civilian vehicles might be trying to target enemies, just not being able to fire.
Because that would be a problem when you hijack it. _________________ Last edited by Bittah Commander on Sun Apr 29, 2012 2:05 pm; edited 2 times in total QUICK_EDIT
My bad. I didn't read about the-still-want-to-move-it-with-script-stuff. And why would you want to hijack neutral vehicles? They're quite useless. Unless you've made changes to them in your mod. So, I think if you don't need them to move and you have no use for them SpeedType=Winged is a good way too. And definitely a nice workaround SJ. Good job. _________________
Team Black wrote:
interesting seeing your voxel work. They're still better than Aro's!
Found another way.
Via a trigger, assign to all neutral units on the map a script, which has only one action: Do This... 0 - Sleep
The units will now sleep and never move, shoot back and simply stay on their cell.
Pro:
-units don't need to be modified and keep their default rules.ini settings.
Cons:
-needs some trigger/script work to be done and must be probably assigned to each single neutral unit. (not tested yet if there can be done a global trigger/script/team that automatically applies to all neutral units on the map)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum