- Joined
- Sep 25, 2005
- Messages
- 71
Alright. I don't have code for this exactly because I'm not sure where to start.
Say I want to start using get/set unitX/unitY to move stuff around as has been suggested. For example, I could use a spell that on cast, creates x dummy units over the target unit in a random spot in a area within x distance units from the target's point, is issued an order to attack ground, then expires. If the unit is close to the edge so that x is outside, we have an issue. Additionally, if a unit is moving via a triggered get/set x & y, it can go outside bounds if it's not held back, and that can crash, right?
Where do I start to set these limitations to these example spells? I'm really hesitant to just implement someone elses' system because I don't feel like I'd really learn that kinda' stuff for myself and that bothers me. Worst case I would, but I'd prefer how to make rudimentary, functional, "don't go outside and crash the game" code.
Say I want to start using get/set unitX/unitY to move stuff around as has been suggested. For example, I could use a spell that on cast, creates x dummy units over the target unit in a random spot in a area within x distance units from the target's point, is issued an order to attack ground, then expires. If the unit is close to the edge so that x is outside, we have an issue. Additionally, if a unit is moving via a triggered get/set x & y, it can go outside bounds if it's not held back, and that can crash, right?
Where do I start to set these limitations to these example spells? I'm really hesitant to just implement someone elses' system because I don't feel like I'd really learn that kinda' stuff for myself and that bothers me. Worst case I would, but I'd prefer how to make rudimentary, functional, "don't go outside and crash the game" code.