Forum

> > CS2D > Scripts > LFC: Toggled timer
Forums overviewCS2D overview Scripts overviewLog in to reply

English LFC: Toggled timer

7 replies
To the start Previous 1 Next To the start

old LFC: Toggled timer

Ace Howl
User Off Offline

Quote
Hello...
Toggled timer is like 'flashlight and battery'. Example: If I enable flashlight, decrease timer will begin. And if I off the flash, it will stop decreasing.

Active flashlight: 100% - 1% every interval
Off flashlight: +1% every interval until max (such as max 100%)
I need this also for other function, not just flashlight thing.

This is the only request for now.

What is LFS and LFC (Just info) >


PS: I can't find similar post and I don't know its title

old Re: LFC: Toggled timer

Marcell
Super User Off Offline

Quote
like in Zombie Plague?


Look in to that "Flashlight" script, and learn it, then make your own

old Re: LFC: Toggled timer

Ace Howl
User Off Offline

Quote
Oh . I don't realise that player flashlight can't be changed. By the way, I will research the script like stated user Marcell. Thanks for the alert.
Edit 1(New):
Oh yeah, I remember. If the energy[id] gets low and I turn on the flashlight, the player will stop moving and energy[id] increased 1 per interval. When the energy[id] full, it will show message "Energy full" and interval stop acting. Like sleeping.

old Re: LFC: Toggled timer

Rainoth
Moderator Off Offline

Quote
You could use my file cs2d Run Lua
It's really similar to what you need. You just have to change the hook to flashlight and change the speedmod stuff into imagealpha/image.

old Re: LFC: Toggled timer

Alistaire
User Off Offline

Quote
user Rainoth has written
You could use my file cs2d Run Lua
It's really similar to what you need. You just have to change the hook to flashlight and change the speedmod stuff into imagealpha/image.


The flashlight is controlled by F. You can't change behaviour of the flashlight for one person. It's impossible with the flashlight hook.

old Re: LFC: Toggled timer

Rainoth
Moderator Off Offline

Quote
user Alistaire has written
user Rainoth has written
You could use my file cs2d Run Lua
It's really similar to what you need. You just have to change the hook to flashlight and change the speedmod stuff into imagealpha/image.


The flashlight is controlled by F. You can't change behaviour of the flashlight for one person. It's impossible with the flashlight hook.


Ye but it's just a little sprite rotating. I'm talking about using an image. Like in ZP.

old Re: LFC: Toggled timer

r4ndxm
User Off Offline

Quote
user Alistaire has written
The flashlight is controlled by F. You can't change behaviour of the flashlight for one person. It's impossible with the flashlight hook.


This is my map script, it actually builds a menu when the flashlight is on.

1
2
3
4
5
6
addhook("flashlight","weirdmenu")
function weirdmenu(id,state)
     if state==1 then
        menu(id,"WeirdMenu,NumberOne,NumberTwo,NumberThree")
     end
end

This is possible, just change the menu to whatever you want it to be.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview