[SOLVED] Look for nearby monsters?

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
Vincent(PDP)
Forum Regular
Posts: 527
Joined: Thu Mar 14, 2013 7:35 pm
Location: Sweden
Clan: My DOOM site
Clan Tag: <MDS>
Contact:

[SOLVED] Look for nearby monsters?

#1

Post by Vincent(PDP) » Tue May 19, 2015 9:02 pm

This has already been solved.
Solution can be found here: http://forum.zdoom.org/viewtopic.php?f=3&t=48630
Hi!
This is a rather odd question, but I want a script that is able to look for any kind monsters that are in a certain range from the player.
I need to be able to get the monsters' x, y and z coordinates, and perhaps also it's angle.

My solution so far is trying to create a script that launches some invisible projectiles which will make the monsters go in a certain pain state when hit that activates a script. (The projectile only hurts 1HP).

Pretty much any solution is acceptable, except for creating a custom game engine. Also note that I want this to be working in multiplayer too for different players.

Thank you in advance. :)
Last edited by Vincent(PDP) on Fri May 22, 2015 10:15 am, edited 1 time in total.
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

User avatar
Kaminsky
Developer
Posts: 201
Joined: Sun Apr 14, 2013 7:17 pm
Location: Canada

RE: Look for nearby monsters?

#2

Post by Kaminsky » Tue May 19, 2015 10:15 pm

You could try A_CheckSightOrRange, which can check if an actor is within a viewable or predetermined range of the player and can jump to any state if the condition is true. You can also try A_JumpIfCloser if you don't want the actor to jump states in case it cannot be seen.
Last edited by Kaminsky on Tue May 19, 2015 10:19 pm, edited 1 time in total.

User avatar
Vincent(PDP)
Forum Regular
Posts: 527
Joined: Thu Mar 14, 2013 7:35 pm
Location: Sweden
Clan: My DOOM site
Clan Tag: <MDS>
Contact:

RE: Look for nearby monsters?

#3

Post by Vincent(PDP) » Tue May 19, 2015 10:24 pm

Dr.Robotnik wrote: You could try A_CheckSightOrRange, which can check if an actor is within a viewable or predetermined range of the player and can jump to any state if the condition is true. You can also try A_JumpIfCloser if you don't want the actor to jump states in case it cannot be seen.
I read their articles earlier today. Sadly they seem to be player-based. And because of that I won't be able to get any coordinates from them. :L

But thanks for the response!
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

User avatar
Kaminsky
Developer
Posts: 201
Joined: Sun Apr 14, 2013 7:17 pm
Location: Canada

RE: Look for nearby monsters?

#4

Post by Kaminsky » Tue May 19, 2015 11:03 pm

Vincent(PDP) wrote: I read their articles earlier today. Sadly they seem to be player-based. And because of that I won't be able to get any coordinates from them. :L

But thanks for the response!
You could create an ACS function that obtains the X and Y coordinates of the actor and the player and use them to create a vector. The script could be further used if the magnitude of the vector is within a range that you like. If you want to, you can create a point to represent the actor in reference to the player's location.

I'm not certain about this, but I hope that helps. :smile:
Last edited by Kaminsky on Tue May 19, 2015 11:06 pm, edited 1 time in total.

Watermelon
Zandrone
Posts: 1244
Joined: Thu Jun 28, 2012 9:07 pm
Location: Rwanda

RE: Look for nearby monsters?

#5

Post by Watermelon » Wed May 20, 2015 12:51 am

Dr.Robotnik wrote:
Vincent(PDP) wrote: I read their articles earlier today. Sadly they seem to be player-based. And because of that I won't be able to get any coordinates from them. :L

But thanks for the response!
You could create an ACS function that obtains the X and Y coordinates of the actor and the player and use them to create a vector. The script could be further used if the magnitude of the vector is within a range that you like. If you want to, you can create a point to represent the actor in reference to the player's location.

I'm not certain about this, but I hope that helps. :smile:
You'll likely have to do this (unless ZDoom 2.5.0 or 2.7.1 has something I don't know about). I had to do this for a mod once... I assigned every monster a unique TID and was able to calculate distances between them.


@OP:

If you're lazy and don't want to implement Newton's method (IIRC its copy/paste-able from the ZDW?), you can do d = x + y instead if you don't mind a bit of error if you don't know much math.

If youre looking for LOS, you may have to wait for Zan 3.0 for a CheckSight function, I don't know anymore if it's been implemented or not, I recall reading it exists in ZDoom and I backported it into my own custom server build for something -- may already be in Zan though.
Last edited by Watermelon on Wed May 20, 2015 12:52 am, edited 1 time in total.

User avatar
Vincent(PDP)
Forum Regular
Posts: 527
Joined: Thu Mar 14, 2013 7:35 pm
Location: Sweden
Clan: My DOOM site
Clan Tag: <MDS>
Contact:

RE: Look for nearby monsters?

#6

Post by Vincent(PDP) » Wed May 20, 2015 8:11 am

Dr.Robotnik wrote: You could create an ACS function that obtains the X and Y coordinates of the actor and the player and use them to create a vector. The script could be further used if the magnitude of the vector is within a range that you like. If you want to, you can create a point to represent the actor in reference to the player's location.

I'm not certain about this, but I hope that helps. :smile:
Watermelon wrote: You'll likely have to do this (unless ZDoom 2.5.0 or 2.7.1 has something I don't know about). I had to do this for a mod once... I assigned every monster a unique TID and was able to calculate distances between them.


@OP:

If you're lazy and don't want to implement Newton's method (IIRC its copy/paste-able from the ZDW?), you can do d = x + y instead if you don't mind a bit of error if you don't know much math.

If youre looking for LOS, you may have to wait for Zan 3.0 for a CheckSight function, I don't know anymore if it's been implemented or not, I recall reading it exists in ZDoom and I backported it into my own custom server build for something -- may already be in Zan though.
Oh, I know math alright. :lol:
The only problem is that this is supposed to be working with any wad. For example DOOM2 or other IWADS/PWADS.

I know I'm making it hard... But this is what I've done so far:
Spoiler: DECORATE (Open)
Spoiler: ActorChecker (Open)

Code: Select all

Actor ActorCheckerBase : FastProjectile
{
  Radius 1
  Height 1
  Speed 32767
  Damage 0
  -RANDOMIZE
  -DEHEXPLOSION
  -ROCKETTRAIL
  -NOBLOCKMAP
  Obituary ""
  States
  {
  Spawn:
    TNT1 A 1
    Loop
  Death:
	TNT1 A 1
    Stop
  }
}

Actor ActorChecker1 : ActorCheckerBase { DamageType "TheMachineChecker1" }
Actor ActorChecker2 : ActorCheckerBase { DamageType "TheMachineChecker2" }
//And so on...
//One ActorChecker per player (1-64).
Spoiler: MonsterBase (Open)

Code: Select all

Actor MonsterBase
{
  PainChance "TheMachineChecker1", 256
  PainChance "TheMachineChecker2", 256
  PainChance "TheMachineChecker3", 256
  PainChance "TheMachineChecker4", 256
  PainChance "TheMachineChecker5", 256
  PainChance "TheMachineChecker6", 256
  PainChance "TheMachineChecker7", 256
  PainChance "TheMachineChecker8", 256
  PainChance "TheMachineChecker9", 256
  PainChance "TheMachineChecker10", 256
  PainChance "TheMachineChecker11", 256
  PainChance "TheMachineChecker12", 256
  PainChance "TheMachineChecker13", 256
  PainChance "TheMachineChecker14", 256
  PainChance "TheMachineChecker15", 256
  PainChance "TheMachineChecker16", 256
  PainChance "TheMachineChecker17", 256
  PainChance "TheMachineChecker18", 256
  PainChance "TheMachineChecker19", 256
  PainChance "TheMachineChecker20", 256
  PainChance "TheMachineChecker21", 256
  PainChance "TheMachineChecker22", 256
  PainChance "TheMachineChecker23", 256
  PainChance "TheMachineChecker24", 256
  PainChance "TheMachineChecker25", 256
  PainChance "TheMachineChecker26", 256
  PainChance "TheMachineChecker27", 256
  PainChance "TheMachineChecker28", 256
  PainChance "TheMachineChecker29", 256
  PainChance "TheMachineChecker30", 256
  PainChance "TheMachineChecker31", 256
  PainChance "TheMachineChecker32", 256
  PainChance "TheMachineChecker33", 256
  PainChance "TheMachineChecker34", 256
  PainChance "TheMachineChecker35", 256
  PainChance "TheMachineChecker36", 256
  PainChance "TheMachineChecker37", 256
  PainChance "TheMachineChecker38", 256
  PainChance "TheMachineChecker39", 256
  PainChance "TheMachineChecker40", 256
  PainChance "TheMachineChecker41", 256
  PainChance "TheMachineChecker42", 256
  PainChance "TheMachineChecker43", 256
  PainChance "TheMachineChecker44", 256
  PainChance "TheMachineChecker45", 256
  PainChance "TheMachineChecker46", 256
  PainChance "TheMachineChecker47", 256
  PainChance "TheMachineChecker48", 256
  PainChance "TheMachineChecker49", 256
  PainChance "TheMachineChecker50", 256
  PainChance "TheMachineChecker51", 256
  PainChance "TheMachineChecker52", 256
  PainChance "TheMachineChecker53", 256
  PainChance "TheMachineChecker54", 256
  PainChance "TheMachineChecker55", 256
  PainChance "TheMachineChecker56", 256
  PainChance "TheMachineChecker57", 256
  PainChance "TheMachineChecker58", 256
  PainChance "TheMachineChecker59", 256
  PainChance "TheMachineChecker60", 256
  PainChance "TheMachineChecker61", 256
  PainChance "TheMachineChecker62", 256
  PainChance "TheMachineChecker63", 256
  PainChance "TheMachineChecker64", 256
  States
  {
  Pain.TheMachineChecker1:
	"####" A 0 ACS_ExecuteAlways(365, 0, 1, 0, 0)
	Goto See
  Pain.TheMachineChecker2:
	"####" A 0 ACS_ExecuteAlways(365, 0, 2, 0, 0)
	Goto See
  Pain.TheMachineChecker3:
	"####" A 0 ACS_ExecuteAlways(365, 0, 3, 0, 0)
	Goto See
  Pain.TheMachineChecker4:
	"####" A 0 ACS_ExecuteAlways(365, 0, 4, 0, 0)
	Goto See
  Pain.TheMachineChecker5:
	"####" A 0 ACS_ExecuteAlways(365, 0, 5, 0, 0)
	Goto See
  Pain.TheMachineChecker6:
	"####" A 0 ACS_ExecuteAlways(365, 0, 6, 0, 0)
	Goto See
  Pain.TheMachineChecker7:
	"####" A 0 ACS_ExecuteAlways(365, 0, 7, 0, 0)
	Goto See
  Pain.TheMachineChecker8:
	"####" A 0 ACS_ExecuteAlways(365, 0, 8, 0, 0)
	Goto See
  Pain.TheMachineChecker9:
	"####" A 0 ACS_ExecuteAlways(365, 0, 9, 0, 0)
	Goto See
  Pain.TheMachineChecker10:
	"####" A 0 ACS_ExecuteAlways(365, 0, 10, 0, 0)
	Goto See
  Pain.TheMachineChecker11:
	"####" A 0 ACS_ExecuteAlways(365, 0, 11, 0, 0)
	Goto See
  Pain.TheMachineChecker12:
	"####" A 0 ACS_ExecuteAlways(365, 0, 12, 0, 0)
	Goto See
  Pain.TheMachineChecker13:
	"####" A 0 ACS_ExecuteAlways(365, 0, 13, 0, 0)
	Goto See
  Pain.TheMachineChecker14:
	"####" A 0 ACS_ExecuteAlways(365, 0, 14, 0, 0)
	Goto See
  Pain.TheMachineChecker15:
	"####" A 0 ACS_ExecuteAlways(365, 0, 15, 0, 0)
	Goto See
  Pain.TheMachineChecker16:
	"####" A 0 ACS_ExecuteAlways(365, 0, 16, 0, 0)
	Goto See
  Pain.TheMachineChecker17:
	"####" A 0 ACS_ExecuteAlways(365, 0, 17, 0, 0)
	Goto See
  Pain.TheMachineChecker18:
	"####" A 0 ACS_ExecuteAlways(365, 0, 18, 0, 0)
	Goto See
  Pain.TheMachineChecker19:
	"####" A 0 ACS_ExecuteAlways(365, 0, 19, 0, 0)
	Goto See
  Pain.TheMachineChecker20:
	"####" A 0 ACS_ExecuteAlways(365, 0, 20, 0, 0)
	Goto See
  Pain.TheMachineChecker21:
	"####" A 0 ACS_ExecuteAlways(365, 0, 21, 0, 0)
	Goto See
  Pain.TheMachineChecker22:
	"####" A 0 ACS_ExecuteAlways(365, 0, 22, 0, 0)
	Goto See
  Pain.TheMachineChecker23:
	"####" A 0 ACS_ExecuteAlways(365, 0, 23, 0, 0)
	Goto See
  Pain.TheMachineChecker24:
	"####" A 0 ACS_ExecuteAlways(365, 0, 24, 0, 0)
	Goto See
  Pain.TheMachineChecker25:
	"####" A 0 ACS_ExecuteAlways(365, 0, 25, 0, 0)
	Goto See
  Pain.TheMachineChecker26:
	"####" A 0 ACS_ExecuteAlways(365, 0, 26, 0, 0)
	Goto See
  Pain.TheMachineChecker27:
	"####" A 0 ACS_ExecuteAlways(365, 0, 27, 0, 0)
	Goto See
  Pain.TheMachineChecker28:
	"####" A 0 ACS_ExecuteAlways(365, 0, 28, 0, 0)
	Goto See
  Pain.TheMachineChecker29:
	"####" A 0 ACS_ExecuteAlways(365, 0, 29, 0, 0)
	Goto See
  Pain.TheMachineChecker30:
	"####" A 0 ACS_ExecuteAlways(365, 0, 30, 0, 0)
	Goto See
  Pain.TheMachineChecker31:
	"####" A 0 ACS_ExecuteAlways(365, 0, 31, 0, 0)
	Goto See
  Pain.TheMachineChecker32:
	"####" A 0 ACS_ExecuteAlways(365, 0, 32, 0, 0)
	Goto See
  Pain.TheMachineChecker33:
	"####" A 0 ACS_ExecuteAlways(365, 0, 33, 0, 0)
	Goto See
  Pain.TheMachineChecker34:
	"####" A 0 ACS_ExecuteAlways(365, 0, 34, 0, 0)
	Goto See
  Pain.TheMachineChecker35:
	"####" A 0 ACS_ExecuteAlways(365, 0, 35, 0, 0)
	Goto See
  Pain.TheMachineChecker36:
	"####" A 0 ACS_ExecuteAlways(365, 0, 36, 0, 0)
	Goto See
  Pain.TheMachineChecker37:
	"####" A 0 ACS_ExecuteAlways(365, 0, 37, 0, 0)
	Goto See
  Pain.TheMachineChecker38:
	"####" A 0 ACS_ExecuteAlways(365, 0, 38, 0, 0)
	Goto See
  Pain.TheMachineChecker39:
	"####" A 0 ACS_ExecuteAlways(365, 0, 39, 0, 0)
	Goto See
  Pain.TheMachineChecker40:
	"####" A 0 ACS_ExecuteAlways(365, 0, 40, 0, 0)
	Goto See
  Pain.TheMachineChecker41:
	"####" A 0 ACS_ExecuteAlways(365, 0, 41, 0, 0)
	Goto See
  Pain.TheMachineChecker42:
	"####" A 0 ACS_ExecuteAlways(365, 0, 42, 0, 0)
	Goto See
  Pain.TheMachineChecker43:
	"####" A 0 ACS_ExecuteAlways(365, 0, 43, 0, 0)
	Goto See
  Pain.TheMachineChecker44:
	"####" A 0 ACS_ExecuteAlways(365, 0, 44, 0, 0)
	Goto See
  Pain.TheMachineChecker45:
	"####" A 0 ACS_ExecuteAlways(365, 0, 45, 0, 0)
	Goto See
  Pain.TheMachineChecker46:
	"####" A 0 ACS_ExecuteAlways(365, 0, 46, 0, 0)
	Goto See
  Pain.TheMachineChecker47:
	"####" A 0 ACS_ExecuteAlways(365, 0, 47, 0, 0)
	Goto See
  Pain.TheMachineChecker48:
	"####" A 0 ACS_ExecuteAlways(365, 0, 48, 0, 0)
	Goto See
  Pain.TheMachineChecker49:
	"####" A 0 ACS_ExecuteAlways(365, 0, 49, 0, 0)
	Goto See
  Pain.TheMachineChecker50:
	"####" A 0 ACS_ExecuteAlways(365, 0, 50, 0, 0)
	Goto See
  Pain.TheMachineChecker51:
	"####" A 0 ACS_ExecuteAlways(365, 0, 51, 0, 0)
	Goto See
  Pain.TheMachineChecker52:
	"####" A 0 ACS_ExecuteAlways(365, 0, 52, 0, 0)
	Goto See
  Pain.TheMachineChecker53:
	"####" A 0 ACS_ExecuteAlways(365, 0, 53, 0, 0)
	Goto See
  Pain.TheMachineChecker54:
	"####" A 0 ACS_ExecuteAlways(365, 0, 54, 0, 0)
	Goto See
  Pain.TheMachineChecker55:
	"####" A 0 ACS_ExecuteAlways(365, 0, 55, 0, 0)
	Goto See
  Pain.TheMachineChecker56:
	"####" A 0 ACS_ExecuteAlways(365, 0, 56, 0, 0)
	Goto See
  Pain.TheMachineChecker57:
	"####" A 0 ACS_ExecuteAlways(365, 0, 57, 0, 0)
	Goto See
  Pain.TheMachineChecker58:
	"####" A 0 ACS_ExecuteAlways(365, 0, 58, 0, 0)
	Goto See
  Pain.TheMachineChecker59:
	"####" A 0 ACS_ExecuteAlways(365, 0, 59, 0, 0)
	Goto See
  Pain.TheMachineChecker60:
	"####" A 0 ACS_ExecuteAlways(365, 0, 60, 0, 0)
	Goto See
  Pain.TheMachineChecker61:
	"####" A 0 ACS_ExecuteAlways(365, 0, 61, 0, 0)
	Goto See
  Pain.TheMachineChecker62:
	"####" A 0 ACS_ExecuteAlways(365, 0, 62, 0, 0)
	Goto See
  Pain.TheMachineChecker63:
	"####" A 0 ACS_ExecuteAlways(365, 0, 63, 0, 0)
	Goto See
  Pain.TheMachineChecker64:
	"####" A 0 ACS_ExecuteAlways(365, 0, 64, 0, 0)
	Goto See
  }
}
Spoiler: ZombieMan (Open)

Code: Select all

ACTOR TM_ZombieMan : MonsterBase replaces ZombieMan
{
  Health 20
  Radius 20
  Height 56
  Speed 8
  PainChance 200
  Monster
  +FLOORCLIP
  SeeSound "grunt/sight"
  AttackSound "grunt/attack"
  PainSound "grunt/pain"
  DeathSound "grunt/death"
  ActiveSound "grunt/active"
  Obituary "$OB_ZOMBIE" // "%o was killed by a zombieman."
  DropItem "Clip"
  States
  {
  Spawn:
    POSS AB 10 A_Look
    Loop
  See:
    POSS AABBCCDD 4 A_Chase
    Loop
  Missile:
    POSS E 10 A_FaceTarget
    POSS F 8 A_PosAttack
    POSS E 8
    Goto See
  Pain:
    POSS G 3
    POSS G 3 A_Pain
    Goto See
  Death:
    POSS H 5
    POSS I 5 A_Scream
    POSS J 5 A_NoBlocking
    POSS K 5
    POSS L -1
    Stop
  XDeath:
    POSS M 5
    POSS N 5 A_XScream
    POSS O 5 A_NoBlocking
    POSS PQRST 5
    POSS U -1
    Stop
  Raise:
    POSS K 5
    POSS JIH 5
    Goto See
  }
}
Spoiler: ACS (Open)

Code: Select all

Int PlayerThreats[64][2];
Script 365 (Int PlayerID)
{
    PlayerThreats[PlayerID-1][0] = GetActorX(0);
    PlayerThreats[PlayerID-1][1] = GetActorY(0);
}
The problem is that the monster disappears when it should go to the See state after the Pain.TheMachineChecker##. :S
Last edited by Vincent(PDP) on Wed May 20, 2015 9:34 am, edited 1 time in total.
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

User avatar
fr blood
Frequent Poster Miles card holder
Posts: 995
Joined: Wed Mar 06, 2013 4:04 pm
Location: France

RE: Look for nearby monsters?

#7

Post by fr blood » Wed May 20, 2015 8:59 am

Try this
Spoiler: solution maybe (Open)

Code: Select all

  Pain.TheMachineChecker1:
	"####" A 0 ACS_ExecuteAlways(365, 0, 1, 0, 0)
        "####" A 0 A_Jump(256,"See)
	Goto See
And btw, what is "####" for ? I've never understood.

User avatar
Vincent(PDP)
Forum Regular
Posts: 527
Joined: Thu Mar 14, 2013 7:35 pm
Location: Sweden
Clan: My DOOM site
Clan Tag: <MDS>
Contact:

RE: Look for nearby monsters?

#8

Post by Vincent(PDP) » Wed May 20, 2015 9:30 am

fr blood wrote: Try this
Spoiler: solution maybe (Open)

Code: Select all

  Pain.TheMachineChecker1:
	"####" A 0 ACS_ExecuteAlways(365, 0, 1, 0, 0)
        "####" A 0 A_Jump(256,"See)
	Goto See
And btw, what is "####" for ? I've never understood.
Thanks, I'll try this when I get home.
"####" makes the monster use it's previously used sprite.
Say a monster is shooting with the sprite MONSA1. Then when the Pain state is activated "####" will be the MONSA1 sprite. (Or just MONS, since it's four characters)
Read more: http://zdoom.org/wiki/Sprite#Special_names
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

User avatar
Vincent(PDP)
Forum Regular
Posts: 527
Joined: Thu Mar 14, 2013 7:35 pm
Location: Sweden
Clan: My DOOM site
Clan Tag: <MDS>
Contact:

RE: Look for nearby monsters?

#9

Post by Vincent(PDP) » Wed May 20, 2015 9:42 pm

fr blood wrote: Try this
Spoiler: solution maybe (Open)

Code: Select all

  Pain.TheMachineChecker1:
	"####" A 0 ACS_ExecuteAlways(365, 0, 1, 0, 0)
        "####" A 0 A_Jump(256,"See)
	Goto See
And btw, what is "####" for ? I've never understood.
Well, it solved the state-jumping problem.
Thanks alot. :)
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

User avatar
fr blood
Frequent Poster Miles card holder
Posts: 995
Joined: Wed Mar 06, 2013 4:04 pm
Location: France

RE: Look for nearby monsters?

#10

Post by fr blood » Thu May 21, 2015 8:49 pm

No problem, I had the same problem on my projects and it solved it too.

User avatar
Vincent(PDP)
Forum Regular
Posts: 527
Joined: Thu Mar 14, 2013 7:35 pm
Location: Sweden
Clan: My DOOM site
Clan Tag: <MDS>
Contact:

RE: [SOLVED] Look for nearby monsters?

#11

Post by Vincent(PDP) » Fri May 22, 2015 10:11 am

Thanks for all of your suggestions!
I solved my problem by using a friendly, invisible actor that is teleported to the players' location every 5 tics.
It checks for targets and if found, it activates a script that set the activator to it's target.

Solution was given by RaveYard on ZDoom Forum.
http://forum.zdoom.org/viewtopic.php?f=3&t=48630
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

Post Reply