Forum

> > CS2D > Scripts > Trigger entity after delay via script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Trigger entity after delay via script

12 replies
To the start Previous 1 Next To the start

old Trigger entity after delay via script

saddy gamer
User Off Offline

Quote
okay so i need a script which will trigger a delay name :- freefire delay

it will have a 30% probability that it will trigger the delay means on round start if it will be luck the delay will be triggered

I tried to learn lua but I got nothing I cant do that

Admin/mod comment

Nobody cares that the script you need is simple. They want to know WHICH script you want. Please chose better titles in future. Fixed. /DC

old Re: Trigger entity after delay via script

Yates
Reviewer Off Offline

Quote
@user Quattro: Yeah but do you have the strength to answer these questions in full anymore? I don't. I'm only here because you asked for clarification

Someone else will land here and answer it eventually.

old Re: Trigger entity after delay via script

Edik
User Off Offline

Quote
1
2
3
4
5
6
addhook("startround", "Startround")
function Startround()
	if math.random(10) <= 3 then
		parse("trigger freefire delay")
	end
end
edited 1×, last 17.08.18 04:27:55 pm

old Re: Trigger entity after delay via script

Cure Pikachu
User Off Offline

Quote
@user Edik: It's not
math.round
lol.
1
2
3
4
5
6
7
8
9
addhook("startround","_startround")
function _startround()
	-- Next 2 lines is primarily for debugging
	local c = math.random(10)
	msg("Number is "..c)
	if c <= 3 then
		parse("trigger 'freefire delay'")
	end
end
Only problem I found is that the RNG isn't working, always generating 8
edited 3×, last 19.08.18 02:54:31 pm

old Re: Trigger entity after delay via script

Edik
User Off Offline

Quote
1
2
3
4
5
6
7
math.randomseed(os.clock())
addhook("startround", "Startround")
function Startround()
	if math.random(10) <= 3 then
		parse("trigger 'freefire delay'")
	end
end

Try this out, make sure that your Entity Name is "freefire delay"
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview