This is My Glow Scripts for Placeables and NPCS, They work for both, the glow scripts just go OnHeartBeat of a NPC, or Placeable(They will not work if the placeable is on Static) Just extract the erf to your ERF folder, Ive also included a Demo Mod with the glow scripts :) Just Simple Scripts I made for peopel who like having cool looking effects but use visual effects now you can use these :D
Version 2-Updated So NPCS Dont break :P Thanks to
Posted by Vertex ( 70.224.xxx.xxx ) at 2006-05-08 08:25:00
Nice job Scar >:)~
Posted by Rami_Ahmed at 2006-05-08 01:49:57 Voted 9.50 on 05/11/06
Heheh. Okay. May I suggest you make the scripts like this:
// OnSpawn of an NPC or OnHeartbeat of a placeable
void main()
{ object oSelf = OBJECT_SELF;
// If put on an NPC's OnSpawn, remember to execute default script.
if (GetObjectType(oSelf) == OBJECT_TYPE_CREATURE)
{ ExecuteScript("x2_def_spawn", oSelf);
}
// If the effect is not allready added. Add the glow effect.
if (!GetLocalInt(oSelf, "AddedEffect"))
{ ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_GLOW_WHITE), oSelf);
}
// If we're a placeable, and we didn't already add the effect, set that the effect has been added.
if (GetObjectType(oSelf) == OBJECT_TYPE_PLACEABLE && !GetLocalInt(oSelf, "AddedEffect"))
{ SetLocalInt(oSelf, "AddedEffect", TRUE);
}
}
That should work, only applying the effect once to placeables, executing default OnSpawn script.
So for NPCs, put the script OnSpawn, and for Placeables, but it on OnHeartbeat or OnUse or anything, it can be used anywhere actually, for placeables.
I'd suggest switching this to an onspawn event, since OHB is pretty CPU intensive when you get more than 3-4 per area. Great script though! _________________________ Lan's Placeable Groups v1.5
OK Wel Ill be adding more Stuff to Vault Like itemprop.2das for legit servers, working on a Admin Toy at the moment _________________________ Demon Scar
I will post a few item filters depending on what kind of legit people like :o _________________________ Demon Scar
Posted by FanofScar at 2006-05-07 14:13:34 Voted 10.00 on 05/07/06
Probably the most original script ever. Nice, I will make sure to use it in my mod Scar. I look forward to your upcoming item filter too.
Posted by FanofScar at 2006-05-07 14:12:17 Voted 10.00 on 05/07/06
Man I gotta hand it to you, this glow script you came up with is nice scar =). I will make sure to use it in my modules. Maybe the most original thing I've ever seen on the Vault. I give it a 10.
Thank you :),I never thought of NPCS Breaking >..< My bad, :o what do you mean
"Secondly:
Very nice job on making the .erf blue?! How'd you do that? :O
lol I bad understander :p _________________________ Demon Scar
Posted by Rami_Ahmed at 2006-05-07 13:05:08 Voted 9.50 on 05/11/06
Firstly:
Let me say that this is a fine idea for those who dont know any scripting at all, it's very easy to understand for anyone.
Secondly:
Very nice job on making the .erf blue?! How'd you do that? :O
Thirdly:
These scripts will actually break NPC's if they are put OnHeartbeat, since they dont execute the default hearbeat script. What you should do is add this to all the scripts:
if (GetObjectType(OBJECT_SELF) == OBJECT_TYPE_CREATURE)
ExecuteScript("x2_def_heartbeat", OBJECT_SELF);
To not break the default AI system, WalkWaypoints etc.
Fourthly, this is kinda "bad" programming, in that you could make it 1 large script and then make it with local variables on the Placeables/NPCs, although this would of course make it a bit more advanced.