![]() |
If I use a Trigger to set a local variable..
( (void main() { if((!(GetLocalInt(OBJECT_SELF, "fired") == 1)) && (GetIsPC(GetEnteringObject()) == TRUE) ) { SetLocalInt(OBJECT_SELF, "fired", 1); ) ..in a multiplayer mod. Will it effect all players when fired? Or will each PC be able to use the trigger? |
If you put this in the trigger's OnEnter script, it'll set the trigger's local int 'fired' to 1. It won't affect any players.
Should you change the OBJECT_SELF to GetEnteringObject(), that would set the entering PC's 'fired' to 1 every time he walked through the trigger. Other players won't be affected. Edit: and you'd need to add } } at the end or it won't save [img]tongue.gif[/img] [ 06-04-2003, 09:04 AM: Message edited by: Legolas ] |
Thanks Leggy.
|
No trouble ;)
Fixing other people's scripts seems to be easier than finding the time to make my own these days... the HT module isn't developing too rapidly anymore. |
Here is how mine works: (a bit different, and doesn't throw a switch)
1. Make a custom trigger (Generic) 2. In the scripts tab, on 'OnEnter' I have script snd_000001 called: What this will do, is play a sound when the user walks into it.. I have it playing a spooky laughing man with a deep voice. User will think someone is watching them.. and will make the moment real tense.. [img]graemlins/hehe.gif[/img] ---- void main() { object oPC = GetEnteringObject(); string sSoundName = "vs_ndbrassf_haha"; if(GetIsPC(oPC)) { AssignCommand(oPC,PlaySound(sSoundName)); } } ---- [ 06-04-2003, 09:45 AM: Message edited by: Ziroc ] |
Thats pretty cool Z. Is there a list of sounds you can play using that script?
My original question was because of the following script, that triggers conversations between NPC's. Very cool, it really makes your module feel more alive; void main() { if((!(GetLocalInt(OBJECT_SELF, "fired") == 1)) && (GetIsPC(GetEnteringObject()) == TRUE) ) { SetLocalInt(OBJECT_SELF, "fired", 1); object oNPC1 = GetObjectByTag("Refugee2_Farmer"); object oNPC2 = GetObjectByTag("Refugee3_Noble"); object oNPC3 = GetObjectByTag("Refugee4_Dwarf"); AssignCommand(oNPC1, ActionSpeakString("Why wont they let us in?")); AssignCommand(oNPC2, ActionWait(4.0)); AssignCommand(oNPC2, ActionSpeakString("I've been told that the city is too crowded already")); AssignCommand(oNPC3, ActionWait(8.0)); AssignCommand(oNPC3, ActionSpeakString("Typical human behaviour. First you destroy our lands, and then you refuse us entrance to the last safe haven")); AssignCommand(oNPC1, ActionWait(12.0)); AssignCommand(oNPC1, ActionSpeakString("Oh.. shut up. We're all in this together")); AssignCommand(oNPC2, ActionWait(12.0)); AssignCommand(oNPC2, ActionSpeakString("Speak for yourself peasant.")); AssignCommand(oNPC3, ActionWait(12.0)); AssignCommand(oNPC3, ActionSpeakString("Typical human behaviour...")); } } Perhaps we should create a script exchange thread ;) |
Quote:
I'm also looking to make a script encounter, where the following happens: 1. Player enters trigger. 2. 2 NPC appear, 1 is running away from the other one, yelling 'help', and the other dude is a bad wizard, and says 'you're doomed! Die!' and fires off a lightning bolt at her and this bolt MUST kill on the 1st attack. She dies, and leaves a body, and the wizard stops for a second, then does a simple spell effect and vanashes. Can you do this? or know of a script like this? If not, I'll work on it today.. It's just that scripting takes lots of time. ugh! [img]smile.gif[/img] |
I could take your question to the official Bioware boards if you like [img]smile.gif[/img] Loads of experienced scripters down there...
On another note; the above script wasn't of my making. I picked it up in the Shadowlords Module. |
All times are GMT -4. The time now is 11:29 AM. |
Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved