Basic Spawn Script

Post » Tue Jan 22, 2013 9:58 pm

Hello dear members,

Does anyone know, how i can implement a loop until 10, that repeats the spawn of "myNpC" again after 5 Sec?
Also i would like to have 20 "myNPCs" spawn at once. It is meant to be 10 waves, 20 draugr each. I know how it would work, but if possible i would like to type 20 lines for my script instead of 200.

Thats the last version of my script, which i know has a different effect, but no matter how i twisted it, i couldnt think of a working loop:


Scriptname ChainOrc extends ObjectReference

import game
import debug


ActorBase property myNPC auto

ObjectReference property SpawnPlace0 auto
ObjectReference property SpawnPlace1 auto
ObjectReference property SpawnPlace2 auto
Int Wave

Event OnActivate(ObjectReference akActionRef)


SpawnPlace1.PlaceActorAtMe(myNPC).StartCombat(Game.GetPlayer())
SpawnPlace2.PlaceActorAtMe(myNPC).StartCombat(Game.GetPlayer())

Wave=1

if Wave &--#60; 3
Utility.Wait(5)
SpawnPlace0.PlaceActorAtMe(myNPC).StartCombat(Game.GetPlayer())
Wave=Wave+1

else

endif

EndEvent


EndEvent



Id be very grateful. Also i ll be bugging you, whoever knows how this works, with questions about getting dwemerballistas to work and triggers (i tried it all...)
User avatar
GEo LIme
 
Posts: 3304
Joined: Wed Oct 03, 2007 7:18 pm

Return to V - Skyrim