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] Script Error in Compilation

Page: 1 of 1
 Nick Vader
06-17-2011, 12:59 PM
#1
Why do I get errors when I compile this:confused:

void main() {
effect EffectDeath(int nSpectacularDeath=TRUE, int nDisplayFeedback=TRUE, int nNoFadeAway=TRUE);
}

This script was supposed to create a Death effect...
 VarsityPuppet
06-17-2011, 1:53 PM
#2
You can't declare integer variables inside a function like that.

effect eDeath = EffectDeath(TRUE, TRUE, TRUE);

ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, OBJECT_SELF);

You'd want something like that.
 Istorian
06-17-2011, 1:58 PM
#3
The correct script should look something like this:



void main()
{
object oNPC = GetObjectByTag("YOUR_TAG_HERE");
effect eDeath = EffectDeath(TRUE, TRUE, TRUE);

ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oNPC, 0.0);
}



Just change the Red text to whatever you want in the mod! This should work! ;)

EDIT: Varsity, one step ahead of me! :xp:
 VarsityPuppet
06-17-2011, 2:01 PM
#4
Er yeah, Istorian's is better, more health conscious.
 Nick Vader
06-17-2011, 9:56 PM
#5
Er yeah, Istorian's is better, more health conscious.

Haha! Thanks to both of you guys.

And istorian: euxaristw re...
Page: 1 of 1