- Joined
- Dec 15, 2012
- Messages
- 650
How do I detects Player 1 (Red) is playing game in Single Player ?
?

_________________
~
Thanks for your help
~
~


This checks the status of Player 1 (Red) is playing or not and it does not detects Player 1 (Red) is playing the game in Single Player mode, thanks for your reply.
Conditions
(Player 1 (Red) slot status) Equal to Is playing
(Player 1 (Red) controller) Equal to User
Maybe I didn't explain my problem as well...In WE go to Scenario -> Player Properties. You can name players there, set which player is user, which one is computer, etc.
This checks the status of Player 1 (Red) is playing or not and it does not detects Player 1 (Red) is playing the game in Single Player mode, thanks for your reply.
not really, I afraid some trigger actions may cause errors in Single Player.Except that this is not how it's done..
I know because it IS possible to play gaias solo, as long as you use the local area network thing.
Checks Map flag !? What's that ?Maybe they check one of the map flags?(Such as whether cheats are allowed)
not really, I afraid some trigger actions may cause errors in Single Player.
It's quite simple, really.
Game caches don't really work on battle.net, so you can do stuff with them and see if it did something.
If it loaded correctly, it must be single-player. If it didn't, then it must be multi-player (LAN or battle.net).
You can use this with a boolean, like this:
Actions
Custom script: if ReloadGameCachesFromDisk() then
Game - Display to (All players) the text: Single-Player
Custom script: else
Game - Display to (All players) the text: Multi-Player
Custom script: endif
so you've got it stored.
Actions
Set IsSinglePlayer = False
Custom script: if ReloadGameCachesFromDisk() then
Set IsSinglePlayer = True
Custom script: endif
This also works if there is only 1 player in the game.
function IsSinglePlayer takes nothing returns boolean
return ReloadGameCachesFromDisk()
endfunction
So I just need to copy this enough ??JASS:function IsSinglePlayer takes nothing returns boolean return ReloadGameCachesFromDisk() endfunction
ap0calypse learned it from me![]()
|
you can just do this with custom script and a boolean variable. Ex:
Custom script : set udg_SinglePlayerMode = ReloadGameCachesFromDisk()[/Quote]
Then TRUE = is playing game in [i]Single Player mode[/i] ?
and FALSE = is playing game in [b]Local Area Network[/b] ?
__________________________________
[center]:goblin_yeah: :goblin_good_job:[/center]
ReloadGameCachesFromDisk()
The function I normally use for this also works, but you had to create a game cache for that, making it not as good as yoursJASS:function IsSinglePlayer takes nothing returns boolean return ReloadGameCachesFromDisk() endfunction
ap0calypse learned it from me![]()
better.Awwwww you guys make me so dizzyThe function I normally use for this also works, but you had to create a game cache for that, making it not as good as yours.
So thanks for this method.
Also, nice catch with the short version (set var = native), better than the ITE.
Game Cache - Create a game cache from SinglePlayer.w3v
Custom script: Set IsSinglePlayer = SaveGameCache(bj_lastCreatedGameCache)
Aren't it should be
Custom script: Set IsSinglePlayer = SaveGameCache(bj_lastCreatedGameCache)
we have given him the best solution best_player_88
again,you are not the best
then let's say
You are not a master at all.
You don't want to do that, because your method is better?Almia said:^ really?
But why would Nestharus do such thing if it needs game cache?
Oh yes, that is correct.Xian_1998 said:Aren't it should be
Custom script : set udg_IsSinglePlayer = SaveGameCache(bj_lastCreatedGameCache)
WHAT IF, in the ranking of all the good players, he is ranked 88th?we have given him the best solution best_player_88
again,you are not the best
Please don't do that. Reading the thread is important.about what the other answered, I never read those, I skipped right to the last massage so I could advice my own, uniqe version of doing it.
What about me? With my mighty 1229 rep more! Huahua!Stop feeling jealousy towards someone who has 253 less reputation points than you, that doesn't even makes sence.
WHAT IF, in the ranking of all the good players, he is ranked 88th?
That means he's not saying he's the best, but he's in the top-100 (still a notable achievement).