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 02-10-2004, 06:42 PM   #1
Ziroc
Ironworks Webmaster

     
     Bow to the Meow

 

Join Date: January 4, 2001
Location: Lakeland, Florida
Age: 51
Posts: 11,720
Here is the deal, I have this NPC, and he is good at first, then I talk to him, say "Die" and he attacks me. At the exact same time I say "die", (in conversation) I want some of his friends to spawn in as an encounter. Here is what I have, and it DOESN'T work. Argh. [img]smile.gif[/img]

----------------
void main()
{

int bVisualEffect = SPELL_HARM;
string sObj = "DROWGUARD02";

location lLoc1 = GetLocation(GetWaypointByTag ("WP_SPAWN01"));
location lLoc2 = GetLocation(GetWaypointByTag ("WP_SPAWN02"));
location lLoc3 = GetLocation(GetWaypointByTag ("WP_SPAWN03"));
location lLoc4 = GetLocation(GetWaypointByTag ("WP_SPAWN04"));
location lLoc5 = GetLocation(GetWaypointByTag ("WP_SPAWN05"));

CreateObject(OBJECT_TYPE_CREATURE, sObj, lLoc1, bVisualEffect );
CreateObject(OBJECT_TYPE_CREATURE, sObj, lLoc2, bVisualEffect );
CreateObject(OBJECT_TYPE_CREATURE, sObj, lLoc3, bVisualEffect );
CreateObject(OBJECT_TYPE_CREATURE, sObj, lLoc4, bVisualEffect );
CreateObject(OBJECT_TYPE_CREATURE, sObj, lLoc5, bVisualEffect );
}
-------------------

And I have 5 waypoints where I want these dudes to appear (I want 5 of them). but nothing happens. Any ideas? Each waypoint is named in succession as in the script above, I've triple checked everything, and am at a loss. Help?? [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 02-10-2004, 06:58 PM   #2
Darkman
Avatar
 

Join Date: July 11, 2001
Location: Austin, Texas
Age: 42
Posts: 525
I think bVisualEffect needs to be set as TRUE or FALSE.

If you want to show a specific animation when the Drow are summoned, I believe you must use a separate command to do that.

So you would create a Drow,

CreateObject(OBJECT_TYPE_CREATURE, sObj, lLoc1, FALSE);

Then you would do a visual effect of your choice at that location,

AssignCommand ( GetObjectByTag(sObj), ApplyEffectAtLocation (DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_HARM), lLoc1, 3.0) );

I think that's how to do it... Lemme check to see if it works

EDIT: It works [img]smile.gif[/img]

Also, be sure that you have this script in the ActionTaken slot in your NPC's conversation. You can mess around with DelayCommand if you want the Drow to be summoned one at a time or something. Also you can use a wide variety of effects for the visual - pretty much every constant starting with VFX is valid.

[ 02-10-2004, 07:35 PM: Message edited by: Darkman ]
__________________
There more of it there is,<br />The less you see.
Darkman is offline   Reply With Quote
Old 02-10-2004, 07:33 PM   #3
Chewbacca
Zartan
 

Join Date: July 18, 2001
Location: America, On The Beautiful Earth
Age: 50
Posts: 5,373
Here is how Lilac Soul script generator does this, I use it to learn for spawns fired by conversation in my arenas and it works fine. Note: the visual effect used in the example is death rather than the harm spell due to the Script gen's defaults

___________
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.6

For download info, please visit:
http://www.lilacsoul.revility.com */

//Put this on action taken in the conversation editor
void main()
{

object oPC = GetPCSpeaker();

object oTarget;
object oSpawn;
location lTarget;
oTarget = GetWaypointByTag("WP_Spawn");

lTarget = GetLocation(oTarget);

oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "resref of spawn creature", lTarget);

oTarget = oSpawn;

//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead

int nInt;
nInt = GetObjectType(oTarget);

if (nInt != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), oTarget));
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), GetLocation(oTarget)));

}

[ 02-10-2004, 07:38 PM: Message edited by: Chewbacca ]
__________________
Support Local Music and Record Stores!
Got Liberty?
Chewbacca is offline   Reply With Quote
Old 02-10-2004, 07:35 PM   #4
Chewbacca
Zartan
 

Join Date: July 18, 2001
Location: America, On The Beautiful Earth
Age: 50
Posts: 5,373
And here is how I actually do it in my arena, minus the visual effect.

____________
code:
location lTarget;
location lTarget2;
location lTarget3;
object oSpawn;
object oSpawn2;
object oSpawn3;
object oTarget;
object oTarget2;
object oTarget3;


void main()
{
object oPC = GetPCSpeaker();

oTarget = GetWaypointByTag("WP_UD_Arena4");
oTarget2 = GetWaypointByTag("WP_UD_Arena5");
oTarget3 = GetWaypointByTag("WP_UD_Arena6");

lTarget = GetLocation(oTarget);
lTarget2 = GetLocation(oTarget2);
lTarget3 = GetLocation(oTarget3);

oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "drowhighmage", lTarget);
oSpawn2 = CreateObject(OBJECT_TYPE_CREATURE, "x2_mephdrow008", lTarget2);
oSpawn3 = CreateObject(OBJECT_TYPE_CREATURE, "x2_mephdrow008", lTarget3);

}
[/QUOTE]
__________________
Support Local Music and Record Stores!
Got Liberty?
Chewbacca is offline   Reply With Quote
Old 02-11-2004, 04:25 AM   #5
Ziroc
Ironworks Webmaster

     
     Bow to the Meow

 

Join Date: January 4, 2001
Location: Lakeland, Florida
Age: 51
Posts: 11,720
Thanks, but the error I made was using the actual TAG and I should have used the resref. [img]smile.gif[/img] UGH! I totally forgot about calling objects and items, you gotta do a resref instead of a tag.

Thanks though!! You can see the results of this script near the exit to the third level on level 2 in my Mod Loki's quest is NOW working, and you can complete it and the XP and rewards are really good.
__________________
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 02-12-2004, 09:08 PM   #6
SpiritWarrior
Jack Burton
 

Join Date: May 31, 2002
Location: Ireland
Posts: 5,854
Yes the tag has problems with custom spawning. You can easily make these guys spawn to the same waypoint, giving a 'togetherness' feel to them and saving on unnecessary cpu consumption.
__________________
Still I feel like a child when I look at the moon, maybe I grew up a little too soon...
SpiritWarrior is offline   Reply With Quote
Old 02-14-2004, 04:00 AM   #7
Chewbacca
Zartan
 

Join Date: July 18, 2001
Location: America, On The Beautiful Earth
Age: 50
Posts: 5,373
I almost always make my tags and resrefs identical on all custom objects, including creatures. Saves me the trouble of remembering when Im supposed use which for what.

I'll hafta check out the EFU additions soon, if I can drag myself away from the toolset long enough! [img]smile.gif[/img]
__________________
Support Local Music and Record Stores!
Got Liberty?
Chewbacca 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
Drow vs Drow argument Sythe Baldurs Gate II: Shadows of Amn & Throne of Bhaal 8 04-07-2003 06:56 PM
Always Toughest Random Spawns (Spoil) Thorfinn Baldurs Gate II: Shadows of Amn & Throne of Bhaal 5 03-10-2003 04:08 PM
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
Drow attacks in Underdark ""HELP"" SPOILER Moridin Baldurs Gate II Archives 2 02-27-2001 03:12 AM


All times are GMT -4. The time now is 07:25 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