How do you use a commsMessage: method in an ai text plist?
"commsMessage: AMessageWithNoSpaceWorks"
I've tried a lot of workarounds to to get it to comm a message including spaces but don't ever receive any message.
commsMessage:
Moderators: winston, another_commander
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Need a "commsMessage: [my-message]", Eg Like this in AI:-
This will send a Comms Message randomly picked of the list defined as [victim1-plea].
In descriptions.plist define the messages like this:-
Code: Select all
"ENERGY_LOW" = (setTargetToPrimaryAggressor, "commsMessage: [victim1-plea]", "setStateTo: SHUTDOWN");
In descriptions.plist define the messages like this:-
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>victim1-plea</key>
<array>
<string>Squeak! This ship's a vintage classic! Leave me alone!</string>
<string>Squeak! Mind the paintwork on my ship, bud!</string>
<string>Squeak! Stop it! I'm on holiday!</string>
<string>Squeak! I'm a ship designer. Let me live and I'll build you a Classic!</string>
<string>Squeak! Mercy! I have no enemies! I'm just a retired designer!</string>
<string>Squeak! I do a lot of good work for charity! Leave me alone!</string>
<string>Squeak! Think of my wife and litter! Let me live!</string>
<string>Squeak! The Soin Clan will make you pay for this!</string>
</array>
</dict>
</plist>
Last edited by LittleBear on Sat Jan 13, 2007 10:24 am, edited 1 time in total.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
Hi LB,
Raises a related question that's been causing me grief ( well not that bad )
Most of my ships use the comm-hail method you state as part of their death_actions - works fine...
I've also added the same to the death_actions of their sub-enities. ( 'oo - there goes my my leg, oo - there goes the other one', that sort of thing )
But,
No coms message. ( no errors either )
I have sucessfully used death_actions for s-e's under other circumstances, though not everything seems to work.
Any ideas?
Ta.
Raises a related question that's been causing me grief ( well not that bad )
Most of my ships use the comm-hail method you state as part of their death_actions - works fine...
I've also added the same to the death_actions of their sub-enities. ( 'oo - there goes my my leg, oo - there goes the other one', that sort of thing )
But,
No coms message. ( no errors either )
I have sucessfully used death_actions for s-e's under other circumstances, though not everything seems to work.
Any ideas?
Ta.
Benulobiweed.inc
By Appointment to
--- : GalCoop : ---
Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main
Charlie
By Appointment to
--- : GalCoop : ---
Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main
Charlie
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Have used comms messages under death_actions for the Main entry but not tried it with sub-entries.
I comms-message under death_actions usually works but not always (EG the Native Thargoids don't always send a Thargoid Curse).
Not sure why this is, but I don't see why it should be any less reliable with a sub-entry death. A workaround could be to give the sub-entry a simply AI that just had:-
The sub-entry (should) then when on energy low send the message and then blow up. If you boosted the energy a little bit to allow for this, then the effect should be the same.
[/code]
I comms-message under death_actions usually works but not always (EG the Native Thargoids don't always send a Thargoid Curse).
Not sure why this is, but I don't see why it should be any less reliable with a sub-entry death. A workaround could be to give the sub-entry a simply AI that just had:-
Code: Select all
"ENERGY_LOW" = ("commsMessage: [damaged]", becomeExplosion);
[/code]
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
Thanks for the swift reply...
Been thinking on those lines, but given how much trouble I've been having getting my Orb.oxp to work, guess I have accept my scripting remains p-poor!
( Orb now working - sort-of - so soon to re-release, but under some circumstances can realy slug my system. Probably as a function of the way I've implented it to avoid scripting as much as possible. Hopefully as a result there will be posts on that thread other than me & my sock-puppet - sounds like a song )
Been thinking on those lines, but given how much trouble I've been having getting my Orb.oxp to work, guess I have accept my scripting remains p-poor!
( Orb now working - sort-of - so soon to re-release, but under some circumstances can realy slug my system. Probably as a function of the way I've implented it to avoid scripting as much as possible. Hopefully as a result there will be posts on that thread other than me & my sock-puppet - sounds like a song )
Benulobiweed.inc
By Appointment to
--- : GalCoop : ---
Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main
Charlie
By Appointment to
--- : GalCoop : ---
Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main
Charlie
Just talking out of my hat, but it might be worth a try doing something silly like this. Assign the sub entities as escorts. Use a messageMother. Perhaps this can trigger a state change in your main entity that you can use to broadcast your message?Charlie wrote:Most of my ships use the comm-hail method you state as part of their death_actions - works fine...
I've also added the same to the death_actions of their sub-enities. But, No coms message. ( no errors either )
I have sucessfully used death_actions for s-e's under other circumstances, though not everything seems to work.
Any ideas?
@ Twisted:
Hmmm - worth a try...
Ta
Hmmm - worth a try...
Ta
Benulobiweed.inc
By Appointment to
--- : GalCoop : ---
Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main
Charlie
By Appointment to
--- : GalCoop : ---
Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main
Charlie
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
I can't get sub-entries folowing an AI at al!
No biggey. THe Black Monk Bases will just be surrounded by a field of minesweeper satilaties as main entries!
No biggey. THe Black Monk Bases will just be surrounded by a field of minesweeper satilaties as main entries!
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.