I need help on trigger gold
Moderator: Cheaters
-
- Member
- Posts: 57
- Joined: March 28th, 2010, 2:49 am
I need help on trigger gold
I need a trigger like dota maps automatically increases each second gold and I can control the increasing amount of it and a command to turn it off and adjust the amount of gold per second increase
Look like money in the house elves and troll map
Link Map troll and elves :http://epicwar.com/maps/131465/
Thank you very much if someone help me
Look like money in the house elves and troll map
Link Map troll and elves :http://epicwar.com/maps/131465/
Thank you very much if someone help me
-
- Spice Pirate
- Posts: 862
- Joined: January 29th, 2009, 5:35 pm
- Title: LHC
- Location: Canada
Re: I need help on trigger gold
This is a pretty basic thing I whipped up in a few minutes. It initializes the var_income array such that each player gets 10 gold/sec, but you can create your own methods of changing the amount people get.Just add "call initIncome()" to your function main, the rest of the stuff where it should go, and this should work fine.
Spoiler:
Spoiler:
-
- Member
- Posts: 57
- Joined: March 28th, 2010, 2:49 am
Re: I need help on trigger gold
Thanks Fatherspace
But I'm only able to get
And an activation command to start Gold trigger
Example :when I enter command -cheaton will enable cheat to me to continue and complete I type -gold in 1000 will automatically increase each second in 1000 when I enter the cheat-cheatoff will automatically turn off and I can adjust the amount of gold per second increases with the command -gold xxxx
But I'm only able to get
And an activation command to start Gold trigger
Example :when I enter command -cheaton will enable cheat to me to continue and complete I type -gold in 1000 will automatically increase each second in 1000 when I enter the cheat-cheatoff will automatically turn off and I can adjust the amount of gold per second increases with the command -gold xxxx
-
- Super Moderator
- Posts: 3197
- Joined: February 24th, 2009, 1:31 pm
- Location: JEW LAND
- Been thanked: 1 time
Re: I need help on trigger gold
I didn't test it tough it should work...
Post this under globals
Post this under endglobals
Post this under function main
There are 3 commands
-cheatson - activating it
-cheatsoff - deactivating it
-# - the number of gold you get every 1 second. so -3 = 3 gold per second
Have fun. Tell me if it doesn't work.
Post this under globals
Spoiler:
Spoiler:
Spoiler:
-cheatson - activating it
-cheatsoff - deactivating it
-# - the number of gold you get every 1 second. so -3 = 3 gold per second
Have fun. Tell me if it doesn't work.
Last edited by haxorico on July 18th, 2010, 3:15 pm, edited 1 time in total.
-
- Member
- Posts: 57
- Joined: March 28th, 2010, 2:49 am
-
- Forum Spammer
- Posts: 610
- Joined: March 30th, 2009, 9:02 pm
Re: I need help on trigger gold
hmm o.o
i always wondered (and i didnt wanna open up a new thread for one basic question)....
why do you set some local variables to null and blank (basically erasing the data in it) when the function is over?
and why are some left as they are (ex: integer id and length in func_activator)?
i always wondered (and i didnt wanna open up a new thread for one basic question)....
why do you set some local variables to null and blank (basically erasing the data in it) when the function is over?
and why are some left as they are (ex: integer id and length in func_activator)?
-
- Super Moderator
- Posts: 3197
- Joined: February 24th, 2009, 1:31 pm
- Location: JEW LAND
- Been thanked: 1 time
Re: I need help on trigger gold
memory leaks.
integers and booleans dont leak as far as I know tough player and string variables do leak. So its like deleteting them
integers and booleans dont leak as far as I know tough player and string variables do leak. So its like deleteting them
-
- Spice Pirate
- Posts: 862
- Joined: January 29th, 2009, 5:35 pm
- Title: LHC
- Location: Canada
Re: I need help on trigger gold
It's not deleting them. Think of it like a variable being a box which can expand and contract to fit its contents, and you've got a thousand of those in a box that's a fixed size.
If you null and destroy, you empty the little boxes, so you have more space left in the big box.
What an awesome metaphor.
If you null and destroy, you empty the little boxes, so you have more space left in the big box.
What an awesome metaphor.
Spoiler:
-
- Forum Spammer
- Posts: 610
- Joined: March 30th, 2009, 9:02 pm
Re: I need help on trigger gold
hmmm so.....a variable is a box (in your metaphor) that can expand and contract to fit w.e's in there
and there's a thousand of them....thats a FIXED size o.o
if u null/destroy and empty the little boxes....you have more space in the big box....
what is the little and big box o.o
theres only one size of box in this metaphor lol
the fixed size one xD
anyway....not to put u down or anything ^^ but yea i get it
ty ppls :D
and there's a thousand of them....thats a FIXED size o.o
if u null/destroy and empty the little boxes....you have more space in the big box....
what is the little and big box o.o
theres only one size of box in this metaphor lol
the fixed size one xD
anyway....not to put u down or anything ^^ but yea i get it
ty ppls :D