LordDenethor Posted June 17, 2012 Share Posted June 17, 2012 I making an Big arena and need an Trigger wich let Enemys spawn. How can i make that? Help would be Nice. Link to comment Share on other sites More sharing options...
gasti89 Posted June 17, 2012 Share Posted June 17, 2012 (edited) Put a xmarker where you want NPCs to spawn. Put a trigger and attach this Scriptname ArenaSpawnTrigger extends ObjectReference ActorBase property NPCtoSpawn auto ObjectReference property myMarker auto Event OnTriggerEnter(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() myMarker.PlaceActorAtMe(NPCToSpawn, x).StartCombat(Game.GetPlayer()) endif endEvent Where the "x" near StartCombat you have to replace with a number between 0 and 3. 0 = easy, 1 = medium, 2 = hard, 3 = boss. If the actor you want to place isn't a leveled actor, just avoid putting the number. This script will spawn the exact ActorBase everytime you enter the trigger. If you want more variety depending on how many times you enter, let me know. Edited June 17, 2012 by gasti89 Link to comment Share on other sites More sharing options...
LordDenethor Posted June 17, 2012 Author Share Posted June 17, 2012 (edited) It would be nice when after activate the trigger a door opens. is this possible? Edited June 17, 2012 by LordDenethor Link to comment Share on other sites More sharing options...
gasti89 Posted June 17, 2012 Share Posted June 17, 2012 (edited) Scriptname ArenaSpawnTrigger extends ObjectReference ActorBase property NPCtoSpawn auto ObjectReference property myMarker auto Door property myDoor auto Event OnTriggerEnter(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() myMarker.PlaceActorAtMe(NPCToSpawn, x).StartCombat(Game.GetPlayer()) myDoor.SetOpen() endif endEvent If you arena is repeatable, you may want another trigger that teleports you outside and closes the door? EDIT: the script is put on the trigger. Select the trigger box, scripts, new script, name it ArenaSpawnTrigger. Then right click, edit source and paste this. After that save and exit, then double click on the script and fill the properties. Edited June 17, 2012 by gasti89 Link to comment Share on other sites More sharing options...
LordDenethor Posted June 17, 2012 Author Share Posted June 17, 2012 (edited) this is my script : Scriptname ArenaSpawnTrigger extends ObjectReference ActorBase property encBear auto ObjectReference property arenaspawn auto Door property arenadoor auto Event OnTriggerEnter(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() arenaspawn.PlaceActorAtMe(encbear, 3).StartCombat(Game.GetPlayer()) arenadoor.SetOpen() endifendEvent xmarker=arenaspawndoor= arenadoortrigger=arenatriggerwanted enemy= encbear but nothing happens, when i putt the trigger- When i saved the script it apears an error: compilation failed. SetOpen is not a function or does not existNo output generated for ArenaSpawnTrigger, compilation failed. what does this mean? Edited June 17, 2012 by LordDenethor Link to comment Share on other sites More sharing options...
gasti89 Posted June 17, 2012 Share Posted June 17, 2012 xmarker=arenaspawndoor= arenadoortrigger=arenatriggerwanted enemy= encbear This part has nothing to do with the script. If you're putting it in the script then it will fail to compile. You have to 1st create a trigger box, then double click on it and attach this script in the scripts tab. I suggest you to read this tutorial before working with scripts http://www.creationkit.com/Bethesda_Tutorial_Papyrus_Hello_World Link to comment Share on other sites More sharing options...
Ghaunadaur Posted June 17, 2012 Share Posted June 17, 2012 (edited) Scriptname ArenaSpawnTrigger ObjectReference ActorBase property encBear auto ObjectReference property arenaspawn auto Objectreference property arenadoor auto Event OnTriggerEnter(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() arenaspawn.PlaceActorAtMe(encbear, 1).StartCombat(Game.GetPlayer()) arenadoor.SetOpen() endif endEvent It does compile, but I don't tested if it works correctly Edited June 17, 2012 by Ghaunadaur Link to comment Share on other sites More sharing options...
gasti89 Posted June 17, 2012 Share Posted June 17, 2012 (edited) My fault sorry. The door is a ObjectReference property, like the Marker, not a Door property. EDIT: Ghaunadaur is right ;) Edited June 17, 2012 by gasti89 Link to comment Share on other sites More sharing options...
LordDenethor Posted June 17, 2012 Author Share Posted June 17, 2012 Mhh.... no enemy will spawn. i have the xmarker and an norpullchain as an trigger, i put the script exactly in the trigger but nothing happens. Link to comment Share on other sites More sharing options...
gasti89 Posted June 17, 2012 Share Posted June 17, 2012 The NorPullChain isn't a trigger. It is an activator. Scriptname ArenaSpawnTrigger ObjectReference ActorBase property encBear auto ObjectReference property arenaspawn auto Objectreference property arenadoor auto Event OnActivate(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() arenaspawn.PlaceActorAtMe(encbear, 3).StartCombat(Game.GetPlayer()) arenadoor.SetOpen() endif endEvent This is for activators Link to comment Share on other sites More sharing options...
Recommended Posts