Is it possible for allied "actor's" to appear on beacons?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Is it possible for allied "actor's" to appear on beacons?

Postby Something_1 » Mon Oct 05, 2020 4:17 pm

Hello, sorry for the inconvenience, there will be a way for allied "actors" to appear on a beacon, as in "Brother In Arms" mod, Thanks in advance :D
Something_1
 
Joined: 02 Oct 2020
Operating System: Windows Vista/7/2008 32-bit

Re: Is it possible for allied "actor's" to appear on beacons

Postby Jarewill » Tue Oct 06, 2020 9:41 am

You could make the beacon use A_SpawnItemEx to spawn actors in.
You should give them the +FRIENDLY flag to make them allies.
Jarewill
 
 
 
Joined: 21 Jul 2019

Re: Is it possible for allied "actor's" to appear on beacons

Postby Something_1 » Tue Oct 06, 2020 6:27 pm

Could this code be used to spawn allied units? (Sorry I'm new to zscript programming) :geek:
Code: Select allExpand view
Actor FriendSpawner_DOOM : CustomInventory
{
  +INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
   Inventory.Icon ACDOOMG
   Inventory.PickupMessage "You got a [DOOMGUY] summoner"
   Inventory.PickupSound "friend/pickup"
    inventory.maxamount 100
   States
   {
     Spawn:
         INVA A 1
         Loop
     Use:
        TNT1 A 1 Thing_Remove(89319)
          TNT1 A 1 Thing_Remove(81045)
        TNT1 A 1 A_FireCustomMissile("FriendProjectile_DOOM", 1, 0, 0, 0)
        TNT1 A 1 A_FireCustomMissile("FriendProjectile_usagi", -10, 0, 0, 0)
         Stop
    }
}
Something_1
 
Joined: 02 Oct 2020
Operating System: Windows Vista/7/2008 32-bit

Re: Is it possible for allied "actor's" to appear on beacons

Postby Jarewill » Wed Oct 07, 2020 8:45 am

Could you show more of your code?
Like what is FriendProjectile_DOOM and FriendProjectile_usagi ?
What is tagged with 89319 and 81045 ?
Jarewill
 
 
 
Joined: 21 Jul 2019

Re: Is it possible for allied "actor's" to appear on beacons

Postby Something_1 » Sun Oct 11, 2020 12:07 pm

Jarewill wrote:Could you show more of your code?
Like what is FriendProjectile_DOOM and FriendProjectile_usagi ?
What is tagged with 89319 and 81045 ?

Yes, no problem. The original code is from "Brothers in Arms", just to know how to spawn allied actors, sorry for the inconvenience.
Code: Select allExpand view
//*****************************************************
// FriendSpawner
//*****************************************************

Actor FriendSpawner_DOOM : CustomInventory
{
  +INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
   Inventory.Icon ACDOOMG
   Inventory.PickupMessage "You got a [DOOMGUY] summoner"
   Inventory.PickupSound "friend/pickup"
    inventory.maxamount 100
   States
   {
     Spawn:
         INVA A 1
         Loop
     Use:
        TNT1 A 1 Thing_Remove(89319)
          TNT1 A 1 Thing_Remove(81045)
        TNT1 A 1 A_FireCustomMissile("FriendProjectile_DOOM", 1, 0, 0, 0)
        TNT1 A 1 A_FireCustomMissile("FriendProjectile_usagi", -10, 0, 0, 0)
         Stop
    }
}


actor FriendProjectile_DOOM
{
   Radius 4
   Height 4
   Speed 4
   Damage 0
                   Scale 1.0
        +NoBlockmap
        +ActivatePCross
        +ActivateImpact
        -NoTeleport
        +DropOff
        +DontFall
        +Missile
         +DOOMBOUNCE
          +BOUNCEONACTORS
          DeathSound "misc/teleport"
   States
   {
   Spawn:
      INVA A 1 Bright
      Loop
   Death:
                                 TFOG A 8 Bright A_SpawnItem("bia_doomguy",1,8)
                                 TFOG BCDEFGHIJ 8 Bright
                         Stop
   }
}

actor FriendProjectile_usagi
{
   Radius 4
   Height 4
   Speed 4
   Damage 0
                   Scale 1.0
        +NoBlockmap
        +ActivatePCross
        +ActivateImpact
        -NoTeleport
        +DropOff
        +DontFall
        +Missile
         +DOOMBOUNCE
          +BOUNCEONACTORS
          DeathSound "misc/teleport"
   States
   {
   Spawn:
      INVA A 1 Bright
      Loop
   Death:
                                 TFOG A 8 Bright A_SpawnItem("usagi",1,8)
                                 TFOG BCDEFGHIJ 8 Bright
                         Stop
   }
}

Something_1
 
Joined: 02 Oct 2020
Operating System: Windows Vista/7/2008 32-bit


Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests