Teleporting Creatures

Post » Mon Aug 15, 2011 8:10 am

Hello , I am making mod where I want to some creatures when hitted by player are teleporting randomly around player but not very far , I wrote this script on creature :
scn AAtestTELEPORT01SCRIPT
short random1
short random2
short OSAX
short OSAY
short OSAZ

begin OnHit Player
set random1 to rand 1 100
set random2 to rand 1 100
set OSAX to player.getpos X + || - random1
set OSAY to player.getpos Y + || - random1
set OSAZ to player.getpos Z
moveto player OSAX, OSAY, OSAZ
end

It's not working , please help me where I'm doing mistakes ( except writing in english :) ) thanks
User avatar
Justin
 
Posts: 3409
Joined: Sun Sep 23, 2007 12:32 am

Return to IV - Oblivion