Home
Outpost 1
Outpost 2
Chat
Forum
Wiki
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
Outpost Universe Forums
»
Projects & Development
»
Outpost 2 Programming & Development
»
Is Unit Unit1 Doing Something Or Not?
Print
Pages: [
1
]
Go Down
Author
Topic: Is Unit Unit1 Doing Something Or Not? (Read 1397 times)
Flashy
Sr. Member
Posts: 391
Is Unit Unit1 Doing Something Or Not?
«
on:
May 25, 2010, 11:45:14 AM »
How can i check if a certain unit just sits around or is moving or is busy with something else? Maybe
Code:
[Select]
if(unit1.GetBusy() == 0)
{
//Unit is doing nothing
}
else
{
//Unit is Moving or it does something else
}
(Just a guess)
«
Last Edit: May 25, 2010, 11:47:24 AM by Flashy
»
Logged
Praise the mighty light towers!!!
Hidiot
Hero Member
Posts: 1018
Is Unit Unit1 Doing Something Or Not?
«
Reply #1 on:
May 25, 2010, 12:26:18 PM »
Well, if you have commands.h, which comes with IUnit.h, you will have a list of all currently known (probably all) unit/building commands.
Unit.GetBusy() will return one of those commands, and you can write ifs or switches to use the info retrieved.
Logged
"Nothing from nowhere, I'm no one at all"
Flashy
Sr. Member
Posts: 391
Is Unit Unit1 Doing Something Or Not?
«
Reply #2 on:
May 25, 2010, 01:06:59 PM »
Thanks. That was the last part of my evacuation transport code. Now version 0.10 is finally ready.
Logged
Praise the mighty light towers!!!
Print
Pages: [
1
]
Go Up
Outpost Universe Forums
»
Projects & Development
»
Outpost 2 Programming & Development
»
Is Unit Unit1 Doing Something Or Not?