Visit the Ironworks Gaming Website Email the Webmaster Graphics Library Rules and Regulations Help Support Ironworks Forum with a Donation to Keep us Online - We rely totally on Donations from members Donation goal Meter

Ironworks Gaming Radio

Ironworks Gaming Forum

Go Back   Ironworks Gaming Forum > Ironworks Gaming Forums > Neverwinter Nights 1 & 2 Also SoU & HotU Forum
FAQ Calendar Arcade Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 06-04-2003, 06:18 AM   #1
Dreamer128
Dracolisk
 

Join Date: March 21, 2001
Location: Europe
Age: 39
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?
Dreamer128 is offline   Reply With Quote
Old 06-04-2003, 09:02 AM   #2
Legolas
Jack Burton
 

Join Date: March 31, 2001
Location: The zephyr lands beneath the brine.
Age: 39
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 ]
Legolas is offline   Reply With Quote
Old 06-04-2003, 09:23 AM   #3
Dreamer128
Dracolisk
 

Join Date: March 21, 2001
Location: Europe
Age: 39
Posts: 6,136
Thanks Leggy.
Dreamer128 is offline   Reply With Quote
Old 06-04-2003, 09:38 AM   #4
Legolas
Jack Burton
 

Join Date: March 31, 2001
Location: The zephyr lands beneath the brine.
Age: 39
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.
Legolas is offline   Reply With Quote
Old 06-04-2003, 09:44 AM   #5
Ziroc
Ironworks Webmaster

     
     Bow to the Meow

 

Join Date: January 4, 2001
Location: Lakeland, Florida
Age: 51
Posts: 11,720
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 ]
__________________
Ziroc™
Ironworks Gaming Webmaster
www.ironworksgaming.com

The Great Escape Studios - 2D/3D Modeling
www.tgeweb.com & Ziroc's Facebook Page
Visit My Flickr Photo Album
Ziroc is offline   Reply With Quote
Old 06-04-2003, 10:08 AM   #6
Dreamer128
Dracolisk
 

Join Date: March 21, 2001
Location: Europe
Age: 39
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
Dreamer128 is offline   Reply With Quote
Old 06-04-2003, 11:53 AM   #7
Ziroc
Ironworks Webmaster

     
     Bow to the Meow

 

Join Date: January 4, 2001
Location: Lakeland, Florida
Age: 51
Posts: 11,720
Quote:
Originally posted by Dreamer128:
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
That looks like a nice script! I'll try this one out right now! I'll let ya know what I did!

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]
__________________
Ziroc™
Ironworks Gaming Webmaster
www.ironworksgaming.com

The Great Escape Studios - 2D/3D Modeling
www.tgeweb.com & Ziroc's Facebook Page
Visit My Flickr Photo Album
Ziroc is offline   Reply With Quote
Old 06-04-2003, 01:42 PM   #8
Dreamer128
Dracolisk
 

Join Date: March 21, 2001
Location: Europe
Age: 39
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.
Dreamer128 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 02:08 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved