![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
#1 |
Dracolisk
![]() Join Date: March 21, 2001
Location: Europe
Age: 40
Posts: 6,136
|
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? |
![]() |
![]() |
![]() |
#2 |
Jack Burton
![]() Join Date: March 31, 2001
Location: The zephyr lands beneath the brine.
Age: 40
Posts: 5,459
|
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 ] |
![]() |
![]() |
![]() |
#3 |
Dracolisk
![]() Join Date: March 21, 2001
Location: Europe
Age: 40
Posts: 6,136
|
Thanks Leggy.
|
![]() |
![]() |
![]() |
#4 |
Jack Burton
![]() Join Date: March 31, 2001
Location: The zephyr lands beneath the brine.
Age: 40
Posts: 5,459
|
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. |
![]() |
![]() |
![]() |
#5 |
Ironworks Webmaster
Join Date: January 4, 2001
Location: Lakeland, Florida
Age: 52
Posts: 11,727
|
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 ] |
![]() |
![]() |
![]() |
#6 |
Dracolisk
![]() Join Date: March 21, 2001
Location: Europe
Age: 40
Posts: 6,136
|
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 ![]() |
![]() |
![]() |
![]() |
#7 | |
Ironworks Webmaster
Join Date: January 4, 2001
Location: Lakeland, Florida
Age: 52
Posts: 11,727
|
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] |
|
![]() |
![]() |
![]() |
#8 |
Dracolisk
![]() Join Date: March 21, 2001
Location: Europe
Age: 40
Posts: 6,136
|
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. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
script question | el_kalkylus | Baldurs Gate II: Shadows of Amn & Throne of Bhaal | 2 | 06-13-2005 09:15 AM |
Script help | Lord Splynncryth | Dungeon Craft - RPG Game Maker | 2 | 09-15-2002 11:35 PM |
Script | Wedin | Icewind Dale | Heart of Winter | Icewind Dale II Forum | 3 | 04-06-2002 02:14 PM |
Char Script question for the experts...Poll? | bg2-mark | Baldurs Gate II Archives | 0 | 08-21-2001 11:26 AM |
how to use script compliler? | sam miller | Icewind Dale | Heart of Winter | Icewind Dale II Forum | 1 | 04-02-2001 08:24 PM |