Forum

> > CS2D > Maps/Editor > About Trigger_If
Forums overviewCS2D overview Maps/Editor overviewLog in to reply

English About Trigger_If

4 replies
To the start Previous 1 Next To the start

old About Trigger_If

Misho
User Off Offline

Quote
Hello us.
I've started wondering about Trigger_If and the things you can do with it.
And I started working with it and it was amazing, pretty cool.
But I have some questions, that I can't answer.

Example:
> Trigger_If
player(1,'money')>1000
This means if player [id-1] has more than 1000$ he can trigger this.
But how can I make it for all players from 1-32 ids.
I tried anything that pops out in my mind.

And is it possible to use;
parse('equip [ID that triggered the entity] 45')

old Re: About Trigger_If

Dynamite07
User Off Offline

Quote
the lua script ll be something like this.
1
2
3
4
5
6
7
8
9
addhook("x","y")
function y()
local b
for b=1,32 do
 if player(b,"money")>=1000 then
--something
end
end
end
the trigger_if you can try learn here.
http://www.unrealsoftware.de/files_show.php?file=12020

Quote
And is it possible to use;
parse('equip [ID that triggered the entity] 45')

You mean if a player use a button he ll be equiped with weapon 45?
edited 1×, last 10.03.13 06:45:08 pm

old Re: About Trigger_If

Misho
User Off Offline

Quote
user Dynamite07 has written
the lua script ll be something like this.
1
2
3
4
5
6
7
8
9
addhook("x","y")
function y()
local b
for b=1,32 do
 if player(b,"money")>=1000 then
--something
end
end
end

That's good.
About file cs2d Automated Shop
I was learning from it.
However it's all good now.
Trigger_If is quite good for 'parse' commands.
To the start Previous 1 Next To the start
Log in to reply Maps/Editor overviewCS2D overviewForums overview