getting scripted marines to follow the player.

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
MasterOFDeath
... in rememberance ...
Posts: 2024
Joined: Sat Apr 03, 2004 10:58 am

getting scripted marines to follow the player.

Post by MasterOFDeath »

Right now in Marine Combat im using path nodes to tell the marines where to go, but it does not want to work right and its making my TID's soar. Is there a way I can get them to follow the player? Thanks in advance.
User avatar
cccp_leha
Posts: 1816
Joined: Wed Jul 16, 2003 7:21 am
Location: NJ, USA
Contact:

Post by cccp_leha »

Hmm, make them hate the player and take their weapons away?.. :?
User avatar
Giest118
Posts: 2914
Joined: Fri Dec 05, 2003 11:02 pm

Post by Giest118 »

But therein lies the problem, Leha... he needs the marines to fire stuff.

Perhaps you could have script lines that tell the monsters to move to a certain point when the player moves over said line...? (a bit limited, but oh well.)
User avatar
cccp_leha
Posts: 1816
Joined: Wed Jul 16, 2003 7:21 am
Location: NJ, USA
Contact:

Post by cccp_leha »

Ha, I've got one for you: switch to MBF (or its reincarnation)! You can then use the helper dogs. :lol:
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".
Contact:

Post by Macil »

Someone/me (i dont remember who did; i might have) made a feature request for a thing that follows another thing (such as a player) but doesn't necessarily hate the followed thing.
User avatar
Grubber
Posts: 1031
Joined: Wed Oct 15, 2003 12:19 am
Location: Czech Republic
Contact:

Post by Grubber »

Thing_SetGoal maybe...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

cccp_leha wrote:Ha, I've got one for you: switch to MBF (or its reincarnation)! You can then use the helper dogs. :lol:

...or the upcoming friendly monsters from Strife...
User avatar
cyber-menace
Posts: 186
Joined: Thu Mar 18, 2004 12:05 pm
Location: N/A

Post by cyber-menace »

I'm not sure if this would work... but, maybe you could do something like this...

Code: Select all

#include "zcommon.acs"

script 1 enter
{
thing_changetid (0, 666);
}

script 2 OPEN
{
Thing_SetGoal (MarTID, 666);
Delay (1);
restart;
}
That way the marine's goal is the player and it would be given that goal every tic. That could cover following you, but if it's going to shoot stuff, you'll need to make the marine hate the enemies too.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

A goal must always be a patrol point. Anything else won't work.
User avatar
MasterOFDeath
... in rememberance ...
Posts: 2024
Joined: Sat Apr 03, 2004 10:58 am

Post by MasterOFDeath »

Graf Zahl wrote:
cccp_leha wrote:Ha, I've got one for you: switch to MBF (or its reincarnation)! You can then use the helper dogs. :lol:

...or the upcoming friendly monsters from Strife...
Guess I will just have to use the Path Nodes for now it seems, until .64. I originally WAS going to do this with MBF, but then I would have to sacrifice monsters in DEHACKED to get marines, and it would be quite limited. Im Marine Combat right now, I have quite a few zdoom only effects. Guess I will have to live with the marines getting stuck in the wall for now... :(
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".
Contact:

Post by Macil »

OH DUH!! I JUST REALIZED THE ANSWER!! I CANT BELIEVE IT WASNT OBVIOUS!

Spawn a patrol point at the player's coordinates, make the monster SetGoal-it, and then a few tics later, spawn a new patrol point at the player coordinates and SetGoal it! And repeat!

I can't believe no one realized this!
User avatar
MasterOFDeath
... in rememberance ...
Posts: 2024
Joined: Sat Apr 03, 2004 10:58 am

Post by MasterOFDeath »

So that will eat up my TIDs how fast and spawn HOW much crap in my map almost nonstop?
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".
Contact:

Post by Macil »

Oops. I wasn't thinking of that.

I just realized solution!!!!!!!!!!!!

Thing_Remove the patrol point after one second and then spawn another at the player's spot WITH THE SAME TID!

It's so simple but such a powerful realization. We can now create things that follow things (like player) without them hating!!
User avatar
Giest118
Posts: 2914
Joined: Fri Dec 05, 2003 11:02 pm

Post by Giest118 »

Whoa, that's, like, an LWM-style solution to the problem!11!11!11111eleventyseventybillionandhundredthousand
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".
Contact:

Post by Macil »

But there is one problem: If the thing that is following gets engaged in battle, i think it will forget about the SetGoal.

I guess you could make a loop that every few tics reminds the thing of its setgoal!

Will someone test this theory? I'm kinda busy now.
Locked

Return to “Editing (Archive)”