- Joined
- Oct 15, 2006
- Messages
- 339
Hello.
I'm working on a Chess map. Here is how i have the rects set-out.
8x8
=64 rects
8█░█░█░█h8
7░█░█░█░█
6█░█░█░█░
5░█░█░█░█
4█░█░█░█░
3░█░█░█░█
2█░█░█░█░
1░█░█░█░█
_a bc de fg h
Then i have 8 vertical rects
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
A B C D E F G H
And 8 horizontal rects
8▒▒▒▒▒▒▒▒
7▒▒▒▒▒▒▒▒
6▒▒▒▒▒▒▒▒
5▒▒▒▒▒▒▒▒
4▒▒▒▒▒▒▒▒
3▒▒▒▒▒▒▒▒
2▒▒▒▒▒▒▒▒
1▒▒▒▒▒▒▒▒
So now every square on the board contains 3 rects
▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓
▓X▓▓▓▓▓▓
▓▓▓▓▓▓▓▓
I was going to start the trigger this way,
A unit owned by Player 1 (Red) is issued an order targeting a point
- Issued Order equal to Move
- Unit type of triggering unit equal to UNIT
- If [X] rect contains (random point in B rect) equal to true
AND
- If [X] rect contains (random point in 2 rect) equal to true
Then do (check another trigger to see if enemy or friendly is in the way)
That way i won't have to make a million triggers, just 999,999.
Else do X (and i will have to figure out how to go about doing "X", but that's a different topic if ever it needs be)
The only problem is that "[X]". I need a generalization.. That "[X]" is there for me to select a rect, but i don't wanna!
I need the trigger to specify that the point of issued order is within two rects.
I'll have to figure out adding a trigger if an enemy is in that rect, but i don't think it will be hard if i can first get some help with this pain in the ass.
Thanks!
P.S. Here is an optical illusion i discovered while typing this up
8█ █ █ █
7 █ █ █ █
6█ █ █ █
5 █ █ █ █
4█ █ █ █
3 █ █ █ █
2█ █ █ █
1 █ █ █ █
I'm working on a Chess map. Here is how i have the rects set-out.
8x8
=64 rects
8█░█░█░█h8
7░█░█░█░█
6█░█░█░█░
5░█░█░█░█
4█░█░█░█░
3░█░█░█░█
2█░█░█░█░
1░█░█░█░█
_a bc de fg h
Then i have 8 vertical rects
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
A B C D E F G H
And 8 horizontal rects
8▒▒▒▒▒▒▒▒
7▒▒▒▒▒▒▒▒
6▒▒▒▒▒▒▒▒
5▒▒▒▒▒▒▒▒
4▒▒▒▒▒▒▒▒
3▒▒▒▒▒▒▒▒
2▒▒▒▒▒▒▒▒
1▒▒▒▒▒▒▒▒
So now every square on the board contains 3 rects
▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓
▓X▓▓▓▓▓▓
▓▓▓▓▓▓▓▓
I was going to start the trigger this way,
A unit owned by Player 1 (Red) is issued an order targeting a point
- Issued Order equal to Move
- Unit type of triggering unit equal to UNIT
- If [X] rect contains (random point in B rect) equal to true
AND
- If [X] rect contains (random point in 2 rect) equal to true
Then do (check another trigger to see if enemy or friendly is in the way)
That way i won't have to make a million triggers, just 999,999.
Else do X (and i will have to figure out how to go about doing "X", but that's a different topic if ever it needs be)
The only problem is that "[X]". I need a generalization.. That "[X]" is there for me to select a rect, but i don't wanna!
I need the trigger to specify that the point of issued order is within two rects.
I'll have to figure out adding a trigger if an enemy is in that rect, but i don't think it will be hard if i can first get some help with this pain in the ass.
Thanks!
P.S. Here is an optical illusion i discovered while typing this up
8█ █ █ █
7 █ █ █ █
6█ █ █ █
5 █ █ █ █
4█ █ █ █
3 █ █ █ █
2█ █ █ █
1 █ █ █ █