Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Help ! Confused about trigger spawning enemys

Page: 1 of 1
 Quanon
01-22-2008, 6:44 AM
#1
Title says all : Thing is I got my transitions that work fine, so spawning NPCs with triggers should be almost the same...

Still I got no results, nothing spawns ... bugger :

So here the trigger setup in K-GFF :

http://i116.photobucket.com/albums/o34/slazzir/K_GFF_TRIG.jpg)

This the setup of my UTT file :

http://i116.photobucket.com/albums/o34/slazzir/UTT_FILE_BASIC.jpg)

http://i116.photobucket.com/albums/o34/slazzir/UTT_SCRIPTTAB.jpg)

And ofcourse the script, which compiles but doesn't seem to take effect. :(

http://i116.photobucket.com/albums/o34/slazzir/SCRIPT.jpg)


I just hope theres an obvious "dumb" mistake in there , been cracking my head on this silly problem.

Plus I packed it all up into my .mod file.
 stoffe
01-22-2008, 6:54 AM
#2
Title says all : Thing is I got my transitions that work fine, so spawning NPCs with triggers should be almost the same...

Still I got no results, nothing spawns ... bugger :

I just hope theres an obvious "dumb" mistake in there , been cracking my head on this silly problem.


There is. :) SpawnGhostsAttack1 is longer than 16 characters, and a ResRef can be at most 16 characters in length. You'll have to rename your script to something shorter.
 Seamhainn
01-22-2008, 7:02 AM
#3
Your Tag in the .git file is SpawnAttack01 but should be trig_attkwave01. Though you know that I am new to this stuff, so I might be mistaken.

Take care

EDIT: You should probably listen to stoffe :-) . Just wanted to help though...
 Quanon
01-22-2008, 7:02 AM
#4
There is. :) SpawnGhostsAttack1 is longer than 16 characters, and a ResRef can be at most 16 characters in length. You'll have to rename your script to something shorter.

:lol: I knew it was something plain obvious...

@Seamheinn : It was not directly a problem, but sloppy name giving is not good... and I'm already a chaotic mind :p

Edit : Just one more problem , the trigger seems to work Twice ?

I want to fire just once , is there an extra line for the script to destroy the trigger ?

Or to make it safe to just fire it off once ?
 stoffe
01-22-2008, 7:18 AM
#5
Edit : Just one more problem , the trigger seems to work Twice ?

I want to fire just once , is there an extra line for the script to destroy the trigger ?


You can use a local boolean variable set on the trigger to determine if it has already been fired, and if so don't do the spawning again. Something like:

void main() {
if (GetEnteringObject() == GetFirstPC()) {
if (!GetLocalBoolean(OBJECT_SELF, 40) && !GetIsObjectValid( GetObjectByTag("g_qgmdarkjedi01") )) {
CreateObject(OBJECT_TYPE_CREATURE, "g_qgmdarkjedi01", Location(Vector(-7.22, -43.42, 0.0), 0.0));
SetLocalBoolean(OBJECT_SELF, 40, TRUE);
}
}

}
 Quanon
01-22-2008, 7:29 AM
#6
:worship: Thank you my scripting godess

*Thats one of the GW god statues, in your avy, right ?*

EDIT: It all works now, no suprises there :p

Thread can be closed at moderators (p)leasure :lol:
Page: 1 of 1