Games Support Forums BioWare Info My Account Login Community Sign Up Store
Neverwinter Nights 2 Forums

NWN2: Builders - NWN2 Scripting

Neues Thema    Antwort posten


    Zu meinen Themen hinzufügen

   Zum Ende springen

Autor Placeable Heartbeats
friendlyfire
Game Owner
Profil: friendlyfireNWN
NWN: SoU
NWN: HotU
NWN 2


Beigetreten: 27 Apr 2003
Von: UK
Gepostet: Donnerstag, 05 November 2009 11:28
I think I may have gone mad, but I decided to give NWN2 one last chance... Reinstalled and patched to 1.23, no expansion packs. Nothing else added, clean install.

Make a simple area and put a placeable down. I give the placeable a heartbeat script:

void main(){
SendMessageToPC (GetFirstPC(), "ticktock");
}

Bake, compile all, save, run. No messages. I can see the placeable, it just does not do anything. I check the properties of the placeable and I can see the script there in the heartbeat event slot. I rename the script to p_<tag>_hb where <tag> is the placeable tag. Nothing.

I add the same script to the area heartbeat. Run. "ticktock", "ticktock", "ticktock".

So do placeables not really have heartbeat events or is there some other trickery to getting them working?
  Profil: friendlyfire   Nachricht verschicken an: friendlyfire
ciViLiZed
Game Owner
Profil: ciViLiZedNWN
NWN 2
NWN 2: MotB
NWN 2: SoZ
Mass Effect PC


Beigetreten: 15 Feb 2005
Von: Montreal, Quebec, Canada
Gepostet: Donnerstag, 05 November 2009 01:09
Is your placeable Static FALSE?
_________________
E.C.Patterson
Gaming Parents Studios

NWN2 mod in production: Trinity - Watch the trailer
  Profil: ciViLiZed   Nachricht verschicken an: ciViLiZed
friendlyfire
Game Owner
Profil: friendlyfireNWN
NWN: SoU
NWN: HotU
NWN 2


Beigetreten: 27 Apr 2003
Von: UK
Gepostet: Donnerstag, 05 November 2009 02:22
Good suggestion, but I have tried both (just rechecked, currently not static).
  Profil: friendlyfire   Nachricht verschicken an: friendlyfire
ciViLiZed
Game Owner
Profil: ciViLiZedNWN
NWN 2
NWN 2: MotB
NWN 2: SoZ
Mass Effect PC


Beigetreten: 15 Feb 2005
Von: Montreal, Quebec, Canada
Gepostet: Donnerstag, 05 November 2009 06:14
Just tested in a brand new mod and HB sendmessage works fine with Static FALSE placeable and not with Static TRUE one.

Are you sure the placeable instance is straight from blueprint, and not converted from environmental? Environmental objects converted back to placeables seem to not always recover all their functionality, including perhaps HBs.
_________________
E.C.Patterson
Gaming Parents Studios

NWN2 mod in production: Trinity - Watch the trailer
  Profil: ciViLiZed   Nachricht verschicken an: ciViLiZed
BrianMeyer
Game Owner
Profil: BrianMeyerNWN 2
NWN 2: MotB


Beigetreten: 17 Jun 2003
Gepostet: Donnerstag, 05 November 2009 06:42
I am using a heartbeat in an iPoint placeable.

Seems to work fine for me. Pretty silly, but it does seem to work fine.

Code:

View Post/Code in separate window


_________________
DungeonEternal PVP PW | Joining a PW
  Profil: BrianMeyer   Nachricht verschicken an: BrianMeyer
friendlyfire
Game Owner
Profil: friendlyfireNWN
NWN: SoU
NWN: HotU
NWN 2


Beigetreten: 27 Apr 2003
Von: UK
Gepostet: Donnerstag, 05 November 2009 07:30
Thank you for your help. Here is how the problem occurs. If I pick a standard placeable and add the script, it fires fine.

If I rightclick in the placeable pallete and chose create blueprint, then add the script to the new blue print's hearbeat slot, then it does not fire (with static set to false).

So it apprears to work for an existing placeable blueprint, but not a new blueprint.
  Profil: friendlyfire   Nachricht verschicken an: friendlyfire
Lugaid of the Red Stripes
Game Owner
Profil: Lugaid of the Red StripesNWN 2


Beigetreten: 14 Aug 2008
Gepostet: Donnerstag, 05 November 2009 07:57
Blueprints shouldn't have anything to do with it, the instance in the area is distinct from any blueprints anyway. I've used heartbeats with custom placeables, even placeables spawned-in via script.

How exactly are you using the placeable?
_________________
The Last of the Danaan - SP Mod
Click Here
  Profil: Lugaid of the Red Stripes   Nachricht verschicken an: Lugaid of the Red Stripes
BrianMeyer
Game Owner
Profil: BrianMeyerNWN 2
NWN 2: MotB


Beigetreten: 17 Jun 2003
Gepostet: Donnerstag, 05 November 2009 09:39
Quote: Posted 11/05/09 19:30 (GMT) by friendlyfire

Thank you for your help. Here is how the problem occurs. If I pick a standard placeable and add the script, it fires fine.

If I rightclick in the placeable pallete and chose create blueprint, then add the script to the new blue print's hearbeat slot, then it does not fire (with static set to false).

So it apprears to work for an existing placeable blueprint, but not a new blueprint.

open in new window, compare line by line to another placeable.

The default is not setting something right basically.
_________________
DungeonEternal PVP PW | Joining a PW
  Profil: BrianMeyer   Nachricht verschicken an: BrianMeyer
friendlyfire
Game Owner
Profil: friendlyfireNWN
NWN: SoU
NWN: HotU
NWN 2


Beigetreten: 27 Apr 2003
Von: UK
Gepostet: Freitag, 06 November 2009 10:40
Thanks Brian, the problem was driven from when a new blueprint is created. The default object has 0 hitpoints and regardless of whether it is plot, usable etc, the HB event does not fire unless there is a positive value there.
  Profil: friendlyfire   Nachricht verschicken an: friendlyfire

Neues Thema    Antwort posten

Was bedeuten diese Symbole?
Wo kann ich mehr über die Benutzung der Foren erfahren?

Jump To:

Foren durchsuchen | Häufige Fragen zu Foren | Foren-Archive

 

 

  Visit the Official Site | Technical Support
Neverwinter Nights 2 Official Support
Anzeigen/Verbergen

English
Deutsch
Français
Español
Italiano

Anzeigen/Verbergen

5,042,073 Users
261 Online
59 Eingeloggt

8,767,910 Einträge in den Foren

Neueste Themen in den Foren:
1. Crashing and freezing (NWN2: For the Mac)

2. Will NWN1 forums... (NWN 1: General Discussion (No Spoilers Allowed))

3. No Text And Stretched Screen (NWN 1: Linux Version - General Discussion)

4. The language issue - once more w... (Mass Effect 2 General Discussion (No Spoilers Allowed))

5. ToB - Final Battle help (Baldur's Gate II Gameplay (Spoilers!))


Aktuelle Uhrzeit: (Zeit einstellen)
Sa, 21 November 2009 03:29