View Single Post
Old 09-12-2004, 05:52 PM   #1
Junior Member
StormTrooper789's Avatar
Join Date: Jun 2004
Location: Millington,TN
Posts: 258
Post Random Explosions Tutorial

Have you ever wanted to make a module look like it's under attack like the Endar Spire? WELL NOW YOU CAN, with this script created by StormTrooper789!
void main()
object oPc=GetFirstPC();
object oRand=GetNearestObject(OBJECT_TYPE_ALL,oPc,1);
location lRand=GetLocation(oRand);
Now let's explain this junk :
object oPc=GetFirstPC() means to find your character in the module.
object oRand=GetNearestObject(OBJECT_TYPE_ALL,oPc,1) means to see what objects are near your character that are of any type(sound,placeable,character,door,waypoint, and trigger)
location lRand=GetLocation(oRand) This will generate a location for oRand so the explosions can be made.
This will create an explosion at the randoms objects. 3003 means fragmentation grenade effect.
PlayRumblePattern(1) This will create a rumble effect around the explosion.

Compile the script and your not finished quite yet. We need the script to loop so it wont work only once. Open the *.are file of your module and add the script name without extension to the OnHeartBeat entry. CONGRATULATIONS!

tk102 recommends Injecting this script into the heartbeat

Original thread

I scored 12.03156% on the Geek Test.
What about you?

Official Internet Exploiter hater!

Did you know Microsoft wants to "Assimilate" you with their products?

Last edited by tk102; 01-23-2005 at 08:32 PM.
StormTrooper789 is offline   you may: quote & reply,