EDIT: OK, I took the time to write this and it compiles but doesn't work. Any tips?
//:://////////////////////////////////////////////
// Placeable events
//:://////////////////////////////////////////////
#include "placeable_h"
const string CAMPFIRE = "camp_fire";
const int LIGHT_CAMPFIRE = 4050; //References the VFX_Base 2DA
void main()
{
event ev = GetCurrentEvent();
int nEvent = GetEventType(ev);
int nEventHandled = FALSE; //keep track of whether the event has been handled
switch (nEvent)
{
//---------------------------------------------------------------------
// Sent by engine when creature clicks on the placeable.
//---------------------------------------------------------------------
case EVENT_TYPE_APPLY_EFFECT: // or EVENT_TYPE_PLACEABLE_ONCLICK
object oCampfire = GetObjectByTag(CAMPFIRE);
ApplyEffectOnObject (EFFECT_DURATION_TYPE_PERMANENT, EffectVisualEffect(LIGHT_CAMPFIRE),oCampfire);
nEventHandled = TRUE;
break;
}
if (!nEventHandled) //If this event wasn't handled by this script, let the core script try
{
HandleEvent(ev, RESOURCE_SCRIPT_PLACEABLE_CORE);
}
}
Modifié par Sonmeister, 10 juin 2010 - 10:52 .





Retour en haut






