Randomize wingman words
- DigaRW
- Militia Captain
- Posts: 521
- Joined: Thu Jul 30, 2015 3:10 pm
- Location: The place where I belong
- Contact:
Can anyone tell me how to randomize wingman words? I mean when order to attack, he will say "Roger that" instead "Acknowledge". Also sometimes, he will say " I'm on it".
Download Transcendence mods from Reinvented Workbench Project!
Click this link!
Click this link!
- Xephyr
- Militia Captain
- Posts: 857
- Joined: Fri Dec 14, 2007 1:52 am
- Location: Orion Arm, Milky Way
- Contact:
You can have a random list in a <text> element:
Code: Select all
<Text id="AttackTargetAck">
(random (list
"random1"
"random2"
"random3"
"random4"
))
</Text>
Project Renegade (Beta) : "The Poor Man's Corporate Command!"
Real programmers count from 0. And sometimes I do, too.
Real programmers count from 0. And sometimes I do, too.
- DigaRW
- Militia Captain
- Posts: 521
- Joined: Thu Jul 30, 2015 3:10 pm
- Location: The place where I belong
- Contact:
Two more question.
A code when wingman's shield down and when wingman kill an enemy, they will 'chat'. How to make it?
A code when wingman's shield down and when wingman kill an enemy, they will 'chat'. How to make it?
Download Transcendence mods from Reinvented Workbench Project!
Click this link!
Click this link!
-
- Fleet Officer
- Posts: 1452
- Joined: Tue Aug 19, 2014 10:17 pm
If there isn't a specific tag for wingmen losing their shields, you can use <OnShieldDown> in the events section of their shield to jury rig it.You'll need to change it to the normal version of the shield when the wingman dies. If there isn't already a better way to do this that I was unable to find, it should be tagged on ministry - ships should have an event here too. For dialogue on killing an enemy, register the enemy for events when the player orders an attack, then use <OnObjDestroyed>. Again, this should be easier to do.
- Xephyr
- Militia Captain
- Posts: 857
- Joined: Fri Dec 14, 2007 1:52 am
- Location: Orion Arm, Milky Way
- Contact:
For checking if your wingman's shields are down, use an <OnAttacked> event in the ship class <Events>. This should be compatible with the wingman base class.
Under the event, use (objGetShieldLevel gSource). If this returns zero then send a message;
(objSendMessage gSender gSource "message").
Under the event, use (objGetShieldLevel gSource). If this returns zero then send a message;
(objSendMessage gSender gSource "message").
Project Renegade (Beta) : "The Poor Man's Corporate Command!"
Real programmers count from 0. And sometimes I do, too.
Real programmers count from 0. And sometimes I do, too.
- AssumedPseudonym
- Fleet Officer
- Posts: 1190
- Joined: Thu Aug 29, 2013 5:18 am
- Location: On the other side of the screen.
It might also be worth checking to make sure the ship actually has a shield in that case, using (objGetItems gSource 'sI).Xephyr wrote: ↑Thu Mar 23, 2017 10:44 pmFor checking if your wingman's shields are down, use an <OnAttacked> event in the ship class <Events>. This should be compatible with the wingman base class.
Under the event, use (objGetShieldLevel gSource). If this returns zero then send a message;
(objSendMessage gSender gSource "message").
Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)
My mods on Xelerus: Click here!
Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)