Home Forums Forum Index Neverwinter Nights NWN 1: Scripting OnPerc Fireball
NWN 1: Scripting
Warington Admin
Game OwnerNWN NWN: SoU NWN: HotU Jade Empire:SE Joined: 16 Feb 2008
Posted: Thursday, 05 November 2009 08:03AM
I made this script with help from lilac souls. The creature it goes on is immobile. It's sight range is long. First, it doesn't seem to work at all. Second I was wanting to add so that the creature will cast a fireball every other round. Any help would be great. _________________ Mysteries of Warington. Come join the fun! http://warington.yolasite.com/
Axe Murderer
Game OwnerNWN NWN: SoU NWN: HotU Joined: 16 Jun 2003 From: California U S A Red, White, & Bluuu
Posted: Friday, 06 November 2009 12:42AM
Clear caster's action queue before you try to load it up with the action cast. Don't use the instant cast parameter if you want to see visual effects. When you use instant cast only the spell effects are generated (i.e. no flying fireball just the explosion damage).
Warington Admin
Game OwnerNWN NWN: SoU NWN: HotU Jade Empire:SE Joined: 16 Feb 2008
Posted: Friday, 06 November 2009 05:05AM
You mean something like this:NWScript:
void main()
{
object oPC = GetLastPerceived();
if (!GetIsPC(oPC)) return;
if (!GetLastPerceptionSeen()) return;
ClearAllActions();
object oCaster;
oCaster = GetObjectByTag("fireball_stone");
object oTarget;
oTarget = oPC;
AssignCommand(oCaster, ActionCastSpellAtObject(SPELL_FIREBALL, oTarget, METAMAGIC_ANY, TRUE, 20, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
}
View Post/Code in separate window I do like the PC not to know where the fireball comes from. Keeps them guessing. _________________ Mysteries of Warington. Come join the fun! http://warington.yolasite.com/
Axe Murderer
Game OwnerNWN NWN: SoU NWN: HotU Joined: 16 Jun 2003 From: California U S A Red, White, & Bluuu
Posted: Friday, 06 November 2009 10:25AM
If the creature shooting the fireball is the same one you have the script hooked to then you don't need the AssignCommand:NWScript:
void main()
{ object oPC = GetLastPerceived();
if (!GetIsPC(oPC) || !GetLastPerceptionSeen()) return;
ClearAllActions( TRUE);
ActionCastSpellAtObject( SPELL_FIREBALL, oPC, METAMAGIC_ANY, TRUE, 20, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
View Post/Code in separate window otherwise you need to clear the caster's actions:NWScript:
void main()
{ object oPC = GetLastPerceived();
if (!GetIsPC(oPC) || !GetLastPerceptionSeen()) return;
object oCaster = GetObjectByTag( "fireball_stone");
AssignCommand( oCaster, ClearAllActions( TRUE));
AssignCommand( oCaster, ActionCastSpellAtObject( SPELL_FIREBALL, oPC, METAMAGIC_ANY, TRUE, 20, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
}
View Post/Code in separate window Edited By Axe Murderer on 11/06/09 10:25
Warington Admin
Game OwnerNWN NWN: SoU NWN: HotU Jade Empire:SE Joined: 16 Feb 2008
Posted: Friday, 06 November 2009 07:24PM
It is the first one. Thank you! You make it look so easy. Thank you again for the great help! _________________ Mysteries of Warington. Come join the fun! http://warington.yolasite.com/
What do these icons mean?
Where can I learn how to use the forums?
Jump To:
Select A Forum
BioWare General
-- BioWare Online Store Support
-- Web Site Help
-- BioWare News Discussion
Premium Neverwinter Nights Modules
-- Premium Neverwinter Nights 1 Modules Tec...
-- Premium Neverwinter Nights 1 Modules Dis...
Neverwinter Nights
-- NWN 1: General Discussion (No Spoilers ...
-- NWN 1: Players - Official Campaign (Spo...
-- NWN 1: Players - SoU Official Campaign (...
-- NWN 1: Players - HotU Official Campaign ...
-- NWN 1: Modules Discussion
-- NWN 1: Community Expansion Pack (CEP)
-- NWN 1: Guilds and Registry - Ye Olde Tav...
-- NWN 1: Dungeon Master's Realm
-- NWN 1: Toolset
-- NWN 1: Scripting
-- NWN 1: Custom Content
-- NWN 1: For Developers
-- NWN 1/SoU/HotU Technical Support (Self-H...
-- NWN 1: Server Admin
-- NWN 1: Linux Version - General Discussio...
-- NWN 1: Macintosh Version - General Discu...
Off Topic
-- Off Topic
Old Dragon Age Forums
-- Dragon Age (Old)
-- Dragon Age: Origins General Discussion
Sonic Chronicles: The Dark Brotherhood
-- Sonic Chronicles: The Dark Brotherhood G...
-- Sonic Chronicles Storyline and Strategy ...
Baldur's Gate II Series
-- Baldur's Gate II: SoA and ToB General Di...
-- Baldur's Gate II Gameplay (Spoilers!)
-- Baldur's Gate II: SoA and ToB Technical ...
Baldur's Gate Series
-- Baldur's Gate and Tales of the Sword Coa...
-- Baldur's Gate Gameplay (Spoilers!)
-- Baldur's Gate and TotSC Technical Suppor...
MDK2
-- MDK2 Technical Support
-- MDK2 Gameplay (Spoilers!)
-- MDK2 General Discussion
Shattered Steel
-- Shattered Steel General Discussion
Star Wars: Knights of the Old Republic
-- Official Announcements - Star Wars: Knig...
-- Storyline Discussion (Spoilers Warning) ...
-- Xbox Version (Spoilers Will Be Moved) - ...
-- PC/Mac Version (Spoilers Will Be Moved) ...
-- Technical Support (Self-Help) - Star War...
Jade Empire Forums
-- Jade Empire PC General Discussion (Spoil...
-- Jade Empire Xbox General Discussion (Spo...
-- Jade Empire Storyline and Strategy Discu...
-- Jade Empire Technical Support (Self-Help...
Neverwinter Nights 2
-- NWN2: General discussion forums for NWN2...
-- NWN2: Players - NWN2 Official Campaign (...
-- NWN2: Players - Mask of The Betrayer Cam...
-- NWN2: Players - Storm of Zehir (Spoilers...
-- NwN2: Mysteries of Westgate Adventure Pa...
-- NWN2: Modules
-- NWN2: Guilds and Registry
-- NWN2: Builders - NWN2 Toolset
-- NWN2: Builders - NWN2 Scripting
-- NWN2: Custom Content
-- NWN2: Dungeon Masters Realm
-- NWN2: Persistent Worlds & Multiplayer
-- NWN2: For the Mac
-- NWN2: Tools and Plugin Developers
-- NWN2: Technical Support (Self-Help)
Mass Effect Forums
-- Mass Effect 2 General Discussion (No Spo...
-- Mass Effect 1 General Discussion (No spo...
-- Mass Effect PC Version General Discussio...
-- Mass Effect Storyline and Strategy Discu...
-- Mass Effect for PC Technical Support (Se...
-- Mass Effect for Xbox 360 Technical Suppo...
Archives: Neverwinter Nights
-- Archives: For Everyone - NWN General Di...
-- Archives: NWN HotU General Discussion
-- Archives: NWN SoU General Discussion
-- Archives: Players - NWN Official Campaig...
-- Archives: Witch's Wake Discussion
-- Archives - Players - NWN Modules
-- Archives: Players - Ye Olde Tavern
-- Archives: DMs - Dungeon Master's Realm
-- Archives: Builders - NWN Toolset
-- Archives: Builders - NWN Scripting
-- Archives: Builders - NWN Custom Content
-- Archives: NWN Technical Support (Self-He...
Pre-Release NWN Archives
-- Archives - NWN Official Announcements
-- Archives - General Discussion
-- Archives - Ye Olde Tavern
-- Archives - Dungeon Master's Realm
-- Archives - Models and Model Viewer
-- Archives - Beta Toolset General
-- Archives - Beta Toolset Technical Issues
-- Archives - Beta Toolset Bug Reporting
Forums Archives
-- Archives - Baldur's Gate II Gameplay (Sp...
-- Archives - Off Topic
-- Archives: Baldur's Gate II: SoA and ToB ...
Archives: Star Wars: Knights of the Old Republic
-- Archives: Storyline Discussion (Spoilers...
-- Archives: Xbox Version (Spoilers Will Be...
-- Archives: PC/Mac Version (Spoilers Will ...
Jade Empire Archives
-- Archives - Jade Empire General Discussio...
NwN2 - Pre-Release Archives
-- NWN 2 Toolset and Custom Content
-- NWN 2 Gameplay and Rules
-- NWN 2 Art and Graphics Engine
-- NWN 2 Single Player Campaign
-- NWN 2 General Discussion
Search Forums |
Forums FAQ |
Forum Archives