I tried to find some tutorials on how to create/start catalogs and I haven't had any luck. I want to create a catalog to keep track of a unit's kill bounty. If anyone can point me in the right direction that would be amazing. I have 0 Knowledge about catalogs so I don't even know where to start.
Yeah through triggers. I have another trigger that basically allows one of my units to crit but when he does it ignores the bounty value from the unit because it's killed through a trigger. I'm trying to use catalogs to give them the proper bounty amount.
I had found it when I was trying to find the video I just don't know how to make a catalog and everything else associated with it to get to that part. No rush though I need to fix other things in the meantime.
Or maybe just explain everything? Why you did what you did?
It's hard for me to grasp from just looking at the trigger.
I really do appreciate your help so far I'm just kind of a tactile learner so I can't fully grasp what's going on inside of the catalog from just looking at the trigger.
I tried to find some tutorials on how to create/start catalogs and I haven't had any luck. I want to create a catalog to keep track of a unit's kill bounty. If anyone can point me in the right direction that would be amazing. I have 0 Knowledge about catalogs so I don't even know where to start.
Are you referring to the catalog triggers? If so, those are used to get/set info from the data editor.
If you want to track a number on a per unit basis the best way would be using the unit's custom value.
Yeah through triggers. I have another trigger that basically allows one of my units to crit but when he does it ignores the bounty value from the unit because it's killed through a trigger. I'm trying to use catalogs to give them the proper bounty amount.
I'll look later tonight. I know there's a way to get the bounty number from the unit data.
@RazernokGaming: Go
I had found it when I was trying to find the video I just don't know how to make a catalog and everything else associated with it to get to that part. No rush though I need to fix other things in the meantime.
This is a basic setup for getting bounty.
Bounty in SC2 is known as Kill Resource. Which can reward resources to the player who killed the unit.
Awesome thanks. I should be able to use that how I need to. To get the proper reaction.
@Reaperguyver: Go
No problem.
How do I set Get Bounty to a unit that just died?
Or maybe just explain everything? Why you did what you did?
It's hard for me to grasp from just looking at the trigger.
I really do appreciate your help so far I'm just kind of a tactile learner so I can't fully grasp what's going on inside of the catalog from just looking at the trigger.
@Reaperguyver: Go
The map I provided was just an example of how to get the values from Kill Resource
Make a trigger for when any unit dies then have it use something similar to my Get Bounty function to get the value of the resource you wish to get.
Alright I'll try my best thanks for your help.
Okay so here's what I have it trying to do. I don't know where i messed this up but it's not working properly...
Get Bounty 2
Options: Function
Return Type: Integer
Parameters
Player = 0 <Integer>
Unit = No Unit <Unit>
Grammar Text: Get Bounty 2(Player, Unit)
Hint Text: (None)
Custom Script Code
Local Variables
Bounty = 0 <Integer>
Actions Variable - Set Bounty = (Value of Units (Unit type of Unit) KillResource[0] for player Any Player as an integer)
General - Return Bounty
This is where/how I'm trying to use it.
Critical Strike
Events
Unit - Any Unit takes Non-Fatal Melee damage (from Any effects)
Local Variables
Bounty (Temp) = (Text(Bounty)) <Text>
Critical test 2 = (Random integer between 1 and 25) <Integer>
Bonuscritdamage = (Random integer between 5 and 20) <Integer>
Conditions
(Unit type of (Damaging unit)) == Master Sword Warrior
((Unit type of (Triggering unit)) has Structure attribute) == False Actions
Get Bounty 2((Owner of (Damaging unit)), (Damaging unit))
Any Suggestions?
you need to make the Get Bounty into a function so when you grab it you can set it to a variable in the trigger.
Var TriggerBounty = GetBounty((Owner of (Damaging Unit), (Damaging Unit))
Without it as a function you can't save the returned value to a variable so you can use it in the trigger.
Nice thanks got it working. Just took some fiddling with stuff to get it sorted out.
@Reaperguyver: Go
No problem, glad its working now.
Remember that functions are the only way to get the return value and save it to a variable.