Advertisement
Guest User

Untitled

a guest
Nov 20th, 2014
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. DwarfActor* Dwarf = NULL;
  2. //Nodes has non-zero amount of elements. None are dwarves.
  3. for(int i = 0; i < Nodes->GetLength(); i++)
  4. {
  5. if (Nodes->Get(i)->Object->GetType().compare("Dwarf") == 0)
  6. {
  7. Dwarf = (DwarfActor*)(Nodes->Get(i)->Object);
  8. break;
  9. }
  10. }
  11.  
  12. CommandEvent* MoveCommand = new CommandEvent();
  13. MoveCommand->X = CursorWorldX;
  14. MoveCommand->Y = CursorWorldY;
  15. Dwarf->Events.Dispatch(MoveCommand);
  16. delete MoveCommand;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement