Server Totals
Le'Or - (1)
Elysia - (0)
Deglos - (0)
Ferrell - (0)
M'Chek - (0)
Mikona - (0)
Wilderness - (0)
Visimontium - (0)
Underdark - (0)
Total players: 1
Gallery

Links Menu

Effects scripting on Levelup

Moderators: Nighthawk4, Dungeon Masters

Effects scripting on Levelup

PostAuthor: Neve » Tue Jun 24, 2003 2:53 pm

Hi,

I tried lots of different things to get a special effect on the place of the player who levels up, but no effect appears. Anyone knows what I'm doing wrong ? This is the line of code I made last :

void main()
{
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3), GetLocation(GetPCLevellingUp()), 1.5);
}

It -should- create a summon creature effect...
- As you gaze unknowingly into the seemingly infinite depths of the optics of this altogether passionate embodiment of insatiability, you experience a gradual realisation that the heavily-embellished vocabulary scattered lavishly throughout the sentence you are currently reading is indisputably nothing greater than a generous ration of masculine bovine faeces.
User avatar
Neve
Prince of Bloated Discourse
 
Posts: 192
Joined: Mon Apr 14, 2003 4:09 pm
Location: The Netherlands

PostAuthor: Aloro » Tue Jun 24, 2003 3:53 pm

Hey there. I've found NWScript gets a bit unreliable when nesting commands (especially effects), so I would separate out your function calls, e.g.

Code: Select all
void main()
{
    object oPC = GetPCLevellingUp();
    location lPC = GetLocation(oPC);
    effect eFX = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3);
    ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eFX, lPC, 1.5);
}


- Aloro
User avatar
Aloro
Team Member; Retired with Honors
 
Posts: 12810
Joined: Sat Dec 28, 2002 5:11 am
Location: Rainbow's End

PostAuthor: Neve » Tue Jun 24, 2003 6:50 pm

Hm, I just tried it, but it didn't work either... Could it be my NWN is a bit messed up ? Recently I found the Campaign button to be captionless :?

I made a script which randomly blasts lightning around, with about the same commands, and that one works, it's pretty annoying, because I saw it's possible in Mythos, and it looks very cool.
- As you gaze unknowingly into the seemingly infinite depths of the optics of this altogether passionate embodiment of insatiability, you experience a gradual realisation that the heavily-embellished vocabulary scattered lavishly throughout the sentence you are currently reading is indisputably nothing greater than a generous ration of masculine bovine faeces.
User avatar
Neve
Prince of Bloated Discourse
 
Posts: 192
Joined: Mon Apr 14, 2003 4:09 pm
Location: The Netherlands

PostAuthor: Jordicus » Tue Jun 24, 2003 7:07 pm

you could probably use this:
Code: Select all
 object oPC = GetPCLevellingUp();


and change ApplyEffectAtLocation to ApplyEffectToTarget (something like that...) instead..

i've noticed certain effects will not work on locations, only on targets.
User avatar
Jordicus
Team Member; Retired with Honors
 
Posts: 8048
Joined: Tue Jan 21, 2003 3:46 pm
Location: Whitehall, PA (GMT -4)

PostAuthor: Neve » Tue Jun 24, 2003 7:10 pm

Random lightningblasts :
Code: Select all
void main()
{
    object oLightning = GetObjectByTag("BLASTMARKER" + IntToString(d10()));
    location oStrike = GetLocation(oLightning);

    if (Random(3)-2)
    {
        effect Zap = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
        location Thespot = Location(GetArea(oLightning), GetPosition(oLightning), GetFacing(GetFirstPC()));
        ApplyEffectAtLocation(DURATION_TYPE_INSTANT, Zap, Thespot, 1.0);
  }
}


All you have to do is place upto 10 waypoints and tag them as "BLASTMARKER1", "BLASTMARKER2" etc. Paste this in the OnHeartbeat of the desired area and you're finished. Feel free to use it too 8)
- As you gaze unknowingly into the seemingly infinite depths of the optics of this altogether passionate embodiment of insatiability, you experience a gradual realisation that the heavily-embellished vocabulary scattered lavishly throughout the sentence you are currently reading is indisputably nothing greater than a generous ration of masculine bovine faeces.
User avatar
Neve
Prince of Bloated Discourse
 
Posts: 192
Joined: Mon Apr 14, 2003 4:09 pm
Location: The Netherlands

PostAuthor: Neve » Tue Jun 24, 2003 7:15 pm

Hm...
Code: Select all
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFX, oPC, 1.5);


Didn't work either...
- As you gaze unknowingly into the seemingly infinite depths of the optics of this altogether passionate embodiment of insatiability, you experience a gradual realisation that the heavily-embellished vocabulary scattered lavishly throughout the sentence you are currently reading is indisputably nothing greater than a generous ration of masculine bovine faeces.
User avatar
Neve
Prince of Bloated Discourse
 
Posts: 192
Joined: Mon Apr 14, 2003 4:09 pm
Location: The Netherlands

PostAuthor: Jordicus » Tue Jun 24, 2003 7:31 pm

hmm... duration has to be float not int

did you try it with 1.5f instead of 1.5 ?

it might be assumed, but I'm not sure
User avatar
Jordicus
Team Member; Retired with Honors
 
Posts: 8048
Joined: Tue Jan 21, 2003 3:46 pm
Location: Whitehall, PA (GMT -4)

PostAuthor: Neve » Tue Jun 24, 2003 7:46 pm

Hmm... The fact that 1.0 is used instead of just 1 should be enough indication that it's a float... Also, the lightning script that I wrote earlier works perfectly...

If I levelup in my module, I get a message like "Your char has gathered enough experience to gain a new level", could it be that the custom script isn't 'overwriting' a default script ? I added it in the module properties, any other places I should have to check besides that ?

Thanks for the replies too :)
- As you gaze unknowingly into the seemingly infinite depths of the optics of this altogether passionate embodiment of insatiability, you experience a gradual realisation that the heavily-embellished vocabulary scattered lavishly throughout the sentence you are currently reading is indisputably nothing greater than a generous ration of masculine bovine faeces.
User avatar
Neve
Prince of Bloated Discourse
 
Posts: 192
Joined: Mon Apr 14, 2003 4:09 pm
Location: The Netherlands


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Frannie Mouze, Google [Bot], Sephira, Tel, Trigger, Vichan Lyonsen