ive seen this in a thread but couldn't find it (in the game too).
How do i spin a spawned healthpak where is targetname "healthspin"
tried
$healthspin rotateY -1
i thought but doesntwork
i tried a few other things but didnt get it?
spin healthpak
Moderator: Moderators
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
put a while 1 loop around it.
it might spin too fast to be noticed, but i doubt .speed deals with rotation so i can't help you there.
Code: Select all
while(42)
{
$healthpak rotateY 360 // one rotation
wait 5
}Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
Allo allo
I dunno exactly what youre doing but maybe this peace of script is useful, its an old mod I made, I called it SelfHealing-mod and it shall be executed from Mike_legs.st like this.. exec global/selfhealing.scr
(when the player stands still/rests, a healthpack is spinning above his head and he slowly recovers health)
and here is the selfhealing-script...
Richard
I dunno exactly what youre doing but maybe this peace of script is useful, its an old mod I made, I called it SelfHealing-mod and it shall be executed from Mike_legs.st like this.. exec global/selfhealing.scr
(when the player stands still/rests, a healthpack is spinning above his head and he slowly recovers health)
Code: Select all
////////////////////////////////////////////////////////////////
//
// Standing
//
////////////////////////////////////////////////////////////////
state STAND
{
entrycommands
{
modheight "stand"
movementstealth "1.0"
moveposflags "standing"
//iprint "stand"
exec global/selfhealing.scr
}
Code: Select all
main:
local.master = spawn ScriptMaster
local.master aliascache med_canteen sound/items/Health_Canteen_01.wav soundparms 1.0 0.0 1.0 0.0 160 1600 item loaded maps "m dm obj"
level.heal = int(getcvar(heal))
local.player = self
if (((local.player.selfhealing == 1) || (local.player.health == 100) || (getcvar("heal") != "1")))
{
end
}
else
{
local.player.selfhealing = 1
local.healspot = spawn trigger_multiple
local.healspot.origin = self.origin
local.healspot setsize ( -20 -20 -20 ) ( 20 20 20 )
local.canteen = spawn script_model
local.canteen model "items/item_25_healthbox.tik"
local.canteen.origin = (self.origin + (0 0 100))
local.canteen notsolid
local.canteen rotateY 360
local.canteen playsound med_canteen
}
while ((self istouching local.healspot) && (self.health != 100))
{
if ((self.health >= 70) && (self.health < 100))
{
local.canteen light 0.0 0.65 1.0 150.0
self heal 0.02
}
if ((self.health >= 30) && (self.health < 70))
{
local.canteen light 1.0 0.6 0.0 150.0
self heal 0.05
}
if ((self.health >= 1) && (self.health < 30))
{
local.canteen light 1.0 0.0 0.0 150.0
self heal 0.1
}
wait .8
local.canteen light 1.0 0.0 0.0 0
wait .2
}
local.healspot delete
local.canteen delete
local.player.selfhealing = 0
end

