• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Movement System (Chess board)

Status
Not open for further replies.
Level 17
Joined
Apr 3, 2010
Messages
1,101
So i have created a Datagrid under trigger folder "Data Field" I've have made it give a messages for all possible values for creation So that i know that it has referenced properly. My problem is not the possible spots where a piece can move, but when I activate the spell.

It goes like this:
Spell Activates
Unit Type checked
Position Checked
Possible movement positions calculated
Turning Movement positions into a X Y value
Create Circles at X Y value

However the last part "Create Circles at X Y values" Wont work even though I know that X Y were calculated correctly.

It shows the Creation trigger working. But no unit appears. Since i have a message in unit creation going "Creating unit" and at end "Unit created"?

So i was wondering if anyone could help me fix this problem.
And tell me why the unit wont create. --"Creationg part is very last If then else on a loop interger A 0 - 63

Map is attached
 

Attachments

  • chess Edited4.w3x
    299.2 KB · Views: 105
Last edited:
Level 14
Joined
Jul 25, 2011
Messages
1,065
I think you can use
Unit is going up -> issue (moving unit) to move to point (Position of (moving unit))offset 100 by 90 degrees.
Unit is going down -> issue (moving unit) to move to point (Position of (moving unit)) offset 100 by 270 degrees.
Unit is going right -> issue (moving unit) to move to point (Position of (moving unit)) offset 100 by 0 degrees.
Unit is going left -> issue (moving unit) to move to point (Position of (moving unit)) offset 100 by 180 degrees.

You can change the 100 to the value you want.
 
Level 7
Joined
Apr 30, 2011
Messages
359
the 'circle' object's problem i think . . .

circle of power ~.~
use another base unit please . . .

and to make sure whether the unit is there or not,
use something related to the unit . .
ex: make floating text at the unit position ~
 
Level 17
Joined
Apr 3, 2010
Messages
1,101
@shinji That won't work as i need to move pieces relevantly. Otherwise i could make a Rook move of the board >.>

@Overcold_ice
I have already tried by swapping circle too footman But ill try the Floating Text idea thanks =D

Edit:

I doubled up the creation trigger.

So now it should Create a Cirlce and a Footman. And it should put Text over both.

Niether was created and no text was shown :<
 
Level 7
Joined
Jan 28, 2012
Messages
266
where do you set the hashtable? you create it but you don't assign it to a variable
  • Set data field
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Preparing Database ...
      • Wait 2.00 seconds
      • -------- Setting Values for White units --------
      • Game - Display to (All players) the text: Setting piece value...
      • Wait 2.00 second
      • ...
      • -------- Afile --------
      • Hashtable - Create a hashtable
      • Hashtable - Save Handle Of(Center of A1 <gen>) as 1 of 0 in Hashtable
      • ...
you need to set it to a variable with something like this
  • set Hashtable = (last created hashtable)//INSERT after you create the hashtable
or you coulde use this and get rid of the create hastable function.
  • custom script: set udg_Hashtable = InitHashtable()
 
Level 17
Joined
Apr 3, 2010
Messages
1,101
Yeh tyx i must of forgot xD. Just realised then came on to say problem fixed then saw this o_O

Well thanks alot now finally i get back to work =D
Can't believe i was that stupid to miss that :(

+rep
 
Status
Not open for further replies.
Top