lfnetwork.com mark read register faq members calendar

Thread: Random Explosions Tutorial
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 09-12-2004, 05:52 PM   #1
StormTrooper789
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!
Code:
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);
}
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.
ApplyEffectAtLocation(0,EffectVisualEffect(3003),l
Rand,0.0f)
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,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Tutorials: Scripting > Random Explosions Tutorial

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:33 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.