Forum

> > CS2D > Scripts > How to use timers with images and join hook
Forums overviewCS2D overview Scripts overviewLog in to reply

English How to use timers with images and join hook

6 replies
To the start Previous 1 Next To the start

old How to use timers with images and join hook

ZaibatsuTEAM
User Off Offline

Quote
Okay, So I need some help doing this.

I want a picture to pop up on a players screen when they join, for 10 seconds. But, if I don't use a timer on the picture, it won't show for the other player. but I don't know how to do it, Then I want freeimage to make the picture disappear. which i've already sorted out "timer(10000, "freeimage",img)"

I wanna have a 50 MS delay after a player has joined the game, so that the picture has 50 MS delay before showing up for the player who joined. But I have no idea how to do it. Can someone help me?

old Re: How to use timers with images and join hook

Louie
User Off Offline

Quote
Maybe this will help?(I haven't tried it)
1
2
3
4
5
6
7
8
9
addhook("join","_join")
function _join(id)
     timer(500,"Show_Img",id)
	 timer(10500,"freeimage",id)
end

function Show_Img(id)
    img = image("YourImagePathHere,x,y,2,id")
end

old omg thankyou!

ZaibatsuTEAM
User Off Offline

Quote
THANKS ALOT! YAAAAY
EDIT: oh umm, I'm getting LUA ERROR: sys/lua/autorun/loadingscreen.lua:8: bad argument #2 to 'image' (number expected, got no value) in the console now o.O
edited 1×, last 19.04.15 06:41:32 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview