Jump to content

Home

Random Explosion script


HdVaderII

Recommended Posts

I found this script in the Scripting tutorials, yet when I paste it into my KT text editor, save as a .nss file, and compile, I get a syntax error at line four:

Error: Syntax Error at "object"

 

void main()
{
object oPc=GetFirstPC();
object oRand=GetNearestObject(OBJECT_TYPE_ALL,oPc,1);
location lRand=GetLocation(oRand);
ApplyEffectAtLocation(0,EffectVisualEffect(3003),lRand,0.0f);
PlayRumblePattern(1);
}

Any help?

Link to comment
Share on other sites

I'm still getting the problem. I'm copying the script correctly. Could it be due to the fact that I'm doing this in TSL? I know that's not likely but you never know...

The "PlayRumblePattern(1);" function is used in a number of places in the original K1. I can't remember it being used at all in TSL, so the function might have been removed.

 

The script should work if you take that function out, it just means the screen won't shake when the explosions trigger.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...