- Joined
- Jan 9, 2005
- Messages
- 2,126
Allow me to preface this by saying that I tried reading a tutorial on Structs and... well... "What?"
I'm not a JASSer, even less a vJASSer, but I have used some vJASS resources in the past with relative success. That being said, reading actual code feels like trying to read Mandarin half the time.
I need help understanding how to use this system. In essence, I want to make a unit fire a missile whenever it deals damage (I'm using Bribe's Damage Engine for that). I tried looking at the code on the demo map (LAB4 Target, more specifically) and I couldn't find any of the familiar GUI markers to help me locate myself through the trigger, which I'd say is the first habit I need to undo. Moreover, I have no idea what's supposed to be triggering the missile creation.
That being said, I did take a long hard look at the code and the very vague conclusions (that are probably wrong) I came to were: structs are like triggers within triggers, that can be 'connected' to an object. The Methods inside the Struct serve as events that occur only to the object the Struct is tied to. However, what I read on structs say it's like a custom type that you can create.
What really, really confuses me is that I have NO IDEA how anything connects to anything in the code to go from something like 'if unit is selected, create missile every X seconds'.
I guess what I'm asking is... how do I code this so a missile is created when a unit deals damage?
I'm not a JASSer, even less a vJASSer, but I have used some vJASS resources in the past with relative success. That being said, reading actual code feels like trying to read Mandarin half the time.
I need help understanding how to use this system. In essence, I want to make a unit fire a missile whenever it deals damage (I'm using Bribe's Damage Engine for that). I tried looking at the code on the demo map (LAB4 Target, more specifically) and I couldn't find any of the familiar GUI markers to help me locate myself through the trigger, which I'd say is the first habit I need to undo. Moreover, I have no idea what's supposed to be triggering the missile creation.
That being said, I did take a long hard look at the code and the very vague conclusions (that are probably wrong) I came to were: structs are like triggers within triggers, that can be 'connected' to an object. The Methods inside the Struct serve as events that occur only to the object the Struct is tied to. However, what I read on structs say it's like a custom type that you can create.
What really, really confuses me is that I have NO IDEA how anything connects to anything in the code to go from something like 'if unit is selected, create missile every X seconds'.
I guess what I'm asking is... how do I code this so a missile is created when a unit deals damage?