by YukiHerz » Sun Sep 18, 2016 12:36 pm
Pretty much the same as the acs
GameType, unless this is already possible and i'm just being dump

.
This could allow actors to do different stuff for multiplayer games, an example:
Code: Select all
Actor ManaSpawner : CustomInventory
{
Inventory.PickupSound "misc/p_pkup"
States
{
Spawn:
MAN1 A 1 NoDelay {
If(GameType () != GAME_SINGLE_PLAYER)
{
Return State("MPSpawn");
}
Else
{
Return State("");
}
}
MAN1 A 1 A_JumpIf(CheckClass("FighterPlayer",AAPTR_PLAYER1), "SpawnMana2")
SpawnLoop:
MAN1 A 1
Loop
SpawnMana2:
MAN2 A 1
Loop
MPSpawn:
MAN3 A 1
Loop
PickUp:
TNT1 A 1 ACS_NamedExecuteAlways("AmmoSpawner1")
Stop
}
}
This haphazradly written actor jumps to a different state depending on player 1, but they all run the same script to give ammo based on the player that picks it up (Cleric and Mage get Blue Mana, Fighter gets Green Mana), with the GameType check it would first jump to a MPSpawn state, which would allow a different sprite, pretty much simplifying what Samsara already does, for example.
I'm sure there are other uses, like a monster or friendly monster acting differently depending on the gametype, custom boss monsters accounting for the possibility of multiple players to do different attacks and such.
I hope this is possible.
Pretty much the same as the acs [url=http://zdoom.org/wiki/GameType]GameType[/url], unless this is already possible and i'm just being dump :P .
This could allow actors to do different stuff for multiplayer games, an example:
[code]
Actor ManaSpawner : CustomInventory
{
Inventory.PickupSound "misc/p_pkup"
States
{
Spawn:
MAN1 A 1 NoDelay {
If(GameType () != GAME_SINGLE_PLAYER)
{
Return State("MPSpawn");
}
Else
{
Return State("");
}
}
MAN1 A 1 A_JumpIf(CheckClass("FighterPlayer",AAPTR_PLAYER1), "SpawnMana2")
SpawnLoop:
MAN1 A 1
Loop
SpawnMana2:
MAN2 A 1
Loop
MPSpawn:
MAN3 A 1
Loop
PickUp:
TNT1 A 1 ACS_NamedExecuteAlways("AmmoSpawner1")
Stop
}
}
[/code]
This haphazradly written actor jumps to a different state depending on player 1, but they all run the same script to give ammo based on the player that picks it up (Cleric and Mage get Blue Mana, Fighter gets Green Mana), with the GameType check it would first jump to a MPSpawn state, which would allow a different sprite, pretty much simplifying what Samsara already does, for example.
I'm sure there are other uses, like a monster or friendly monster acting differently depending on the gametype, custom boss monsters accounting for the possibility of multiple players to do different attacks and such.
I hope this is possible.