Scripting creatures spawning in
#1
Posté 09 janvier 2011 - 10:16
#2
Posté 09 janvier 2011 - 11:40
#3
Posté 10 janvier 2011 - 01:18
#4
Posté 10 janvier 2011 - 03:25
#include "utility_h"
#include "wrappers_h"
void main() {
oHero = GetHero();
// define creature objects
object oCreatureName = UT_GetNearestCreatureByTag(oHero, "tag_of_creature");
// set creature active
WR_SetObjectActive(oCreatureName, TRUE);
}Granted, that is extremely basic...
Modifié par techwench, 10 janvier 2011 - 03:26 .
#5
Posté 10 janvier 2011 - 09:42
Or just set the TRIGGER_ENCOUNTER_TEAM variable on the trigger.
#6
Posté 12 janvier 2011 - 01:43
Proerlic- I have the Genlock set to team 1, and the TRIGGER_ENCOUNTER_TEAM also set to 1.
Tech- I put that exact script into my cutscene's end script, but nothing happens. I put the tag of the creature into where you had "tag of creature" written.
obviously I Tried one, then the other- anything else I might be missing?
thanks for your help though!
#7
Posté 12 janvier 2011 - 07:41
There could be an export issue. If you change the trigger variable first, then change the team number on the creature template, you have to export the area again (see wiki).
Modifié par Proleric1, 12 janvier 2011 - 07:41 .
#8
Posté 12 janvier 2011 - 06:04
#9
Posté 13 janvier 2011 - 06:55
[dascript]
#include "log_h"
#include "utility_h"
#include "wrappers_h"
#include "events_h"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
int bEventHandled = FALSE;
object oTrigger = OBJECT_SELF;
string sTrigger = GetTag(oTrigger);
object oCreature = GetEventCreator(ev);
object oPC = GetHero();
switch(nEventType)
{
case EVENT_TYPE_ENTER:
{
/* do stuff */
break;
}
}
if (!bEventHandled)
{
HandleEvent(ev, RESOURCE_SCRIPT_TRIGGER_CORE);
}
}
[/dascript]
#10
Posté 14 janvier 2011 - 12:14





Retour en haut






