[HUD][0.3] how to change clock color when you picked up item
This code might be useful for ppl who always forget item respawn
time (== me :P).
- screenshot

- sample HUD (archive)
Put this pk3 to basewsw and choose 'guwashi' hud from player setting menu.
http://d3.jpn.org/warsow/basewsw/z_guwashi.pk3
- sample code
basewsw/huds/guwashi.hud
basewsw/huds/inc/guwashi/clock.hud
basewsw/huds/inc/guwashi/picked_up_item.hud
- key logic
The point of this logic is quite simple.
That's all :P.
EDIT1: added sample HUD and added key logic.
EDIT2: added screenshot.
EDIT3: updated screenshot :P
- screenshot

- sample HUD (archive)
Put this pk3 to basewsw and choose 'guwashi' hud from player setting menu.
http://d3.jpn.org/warsow/basewsw/z_guwashi.pk3
- sample code
basewsw/huds/guwashi.hud
basewsw/huds/inc/guwashi/clock.hud
basewsw/huds/inc/guwashi/picked_up_item.hud
- key logic
The point of this logic is quite simple.
if %PICKUP_ITEM == 27 // Red Armor
setColor 1, 0, 0, 1 // red
drawClock
endif
That's all :P.
EDIT1: added sample HUD and added key logic.
EDIT2: added screenshot.
EDIT3: updated screenshot :P
sample HUD
http://d3.jpn.org/warsow/basewsw/z_guwashi.pk3
put this pk3 to basewsw and choose 'guwashi' hud from player setting menu.
http://d3.jpn.org/warsow/basewsw/z_guwashi.pk3
put this pk3 to basewsw and choose 'guwashi' hud from player setting menu.
Hehe, I had a hud like this before (its included on my 0.21 huds
but commented out, see warnings.hud)
Should port it to 0.3 I guess.
Should port it to 0.3 I guess.
um8 wrote:
wtf ? how does it work ? :o
The point of this logic is quite simple.
if %PICKUP_ITEM == 27 // Red Armor
setColor 1, 0, 0, 1 // red
drawClock
endif
simple huh?
Didn't we include this in the default hud at the end? I thought it
was included :(
jal: I added this code in old default hud, but default hud was
totally changed to ETR's one... ehh ahh... ETR? :P
Uz: atm, there is no item constants, but is it so often to use item constants?
Uz: atm, there is no item constants, but is it so often to use item constants?
sry i dont get it to work :/ ...how do i notice that it work? is
there a counter counts down or up or what?
as far as i get it it just changes the color of the clock to help u
remember to grab ra, doesnt actually times it?
It changes color when you pick up the item, yeah. It helps you time
it but doesn't like change color when the RA spawns again or
anything. It just lasts for a fixed period of time (just like the
RA icon in most HUDs), and it's easy to read the clock and see the
notification, easier than trying to look in the corner (where the
item pickup is usually located) and read the clock at the same time
:)
Added screenshot on my 1st post.
pille: didn't work? do u copy pk3 to basewsw? (e.g. warsow/basewsw/z_guwashi.pk3)
pille: didn't work? do u copy pk3 to basewsw? (e.g. warsow/basewsw/z_guwashi.pk3)
Raelz: no there isn't that features :P
jal: thx for change topic name :)
jal: thx for change topic name :)
Ahh shit, Guwashi, commit this for 0.31... I totally forgot it I
guess (I remember it being in default hud before... :O) *ashamed*.
Whoa, just noticed this. This is extremely useful, gonna put it to
my hud too.
Edit: Cant get it to work. :( When i pick RA, it starts the optional timer but shows the time left in game and then it disappears in few second. Am i doing something wrong?
Edit: Cant get it to work. :( When i pick RA, it starts the optional timer but shows the time left in game and then it disappears in few second. Am i doing something wrong?
edit: lol . its supposed to do that. the clock doesnt freezes or
something
T-BON3 according to screen up there it counts from 25 to 0, and
thats not what it does to me. It starts that optional timer, but
not with 25sec but whatever theres left in game and after few secs
it disappears (no, not after 25sec like i thought it should). U
mean this is what its supposed to do? Or ive misunderstood
something?

