Friendly monster that follows you
Moderator: InsideQC Admins
16 posts
• Page 1 of 2 • 1, 2
Friendly monster that follows you
I read tutorial about friendly monster here http://inside3d.com/showtutorial.php?id=180
But I need something else. I need a monster that follows you when you find him. For example, I place him in my map, and when I find him, he must protect me. So what I need to change in code to do something like this? Monster - soldier.
But I need something else. I need a monster that follows you when you find him. For example, I place him in my map, and when I find him, he must protect me. So what I need to change in code to do something like this? Monster - soldier.
^O,..,o^
- Freemanoid
- Posts: 52
- Joined: Mon Jun 16, 2008 11:25 am
- Location: BELARUS
Sounds like scourge of armagon (which I'm currently running through), except instead of finding a powerup that you pick up to spawn the monster in front of you, you want the monster to spawn in the level and wait until the player gets near it, or it sees him.
A visibility test and distance test ought to be adequate. You'll also want to make sure your monster does nothing but stand or wander randomly until he sees the player; only when the player finds him can he follow. Not sure where in the code to place that though.
A visibility test and distance test ought to be adequate. You'll also want to make sure your monster does nothing but stand or wander randomly until he sees the player; only when the player finds him can he follow. Not sure where in the code to place that though.
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
- Wazat
- Posts: 771
- Joined: Fri Oct 15, 2004 9:50 pm
- Location: Middle 'o the desert, USA
Not sure if I understand what you mean, but
why don't you add a monsterfriend outside your level, give it a teleport function to the place in your level and use a trigger at the place in the level (near the teleport destination for the monsterfriend) to spawn to?
So a small cage with a teleporter and monsterfriend and targetname to call and a target to send.
A teleportdestination with the target where you want to meet it .
And close nearby a trigger_once that calls the teleporter's targetname to spawn the monsterfriend.
You only have the monsterfriend in game on the moment you reach the trigger_once, that can only be used by you, not by other monsters.
why don't you add a monsterfriend outside your level, give it a teleport function to the place in your level and use a trigger at the place in the level (near the teleport destination for the monsterfriend) to spawn to?
So a small cage with a teleporter and monsterfriend and targetname to call and a target to send.
A teleportdestination with the target where you want to meet it .
And close nearby a trigger_once that calls the teleporter's targetname to spawn the monsterfriend.
You only have the monsterfriend in game on the moment you reach the trigger_once, that can only be used by you, not by other monsters.
-

Madfox - Posts: 106
- Joined: Sat Jan 15, 2005 3:13 pm
- Location: Holland
MOVETYPE_FOLLOW basically attaches an entity to another with ease. that's all. you could find the cujo bot source.
-

Error - InsideQC Staff
- Posts: 865
- Joined: Fri Nov 05, 2004 5:15 am
- Location: VA, USA
Ok, look here. For example, I meet a guy in my level. Then I talk to him and he decide to follow me. That's what I want to do.
^O,..,o^
- Freemanoid
- Posts: 52
- Joined: Mon Jun 16, 2008 11:25 am
- Location: BELARUS
well basically,
. the .guy has to run a findradius
. see if you are visible
. determine your direction
. jump?
or
. movetogoal
or
. idle
wash rinse repeat
google "cujo quake", download "Killer Quake Patch" from filefront, decompile the progs with frikdec, search for "cujo" in the source and then investigate from there
. the .guy has to run a findradius
. see if you are visible
. determine your direction
. jump?
or
. movetogoal
or
. idle
wash rinse repeat
google "cujo quake", download "Killer Quake Patch" from filefront, decompile the progs with frikdec, search for "cujo" in the source and then investigate from there
- r00k
- Posts: 1110
- Joined: Sat Nov 13, 2004 10:39 pm
He wants to have a "character" standing idle on the map, so that when you walk up to it and touch it, then it will walk around the map where you lead. Not just a single place to teleport to. Just like in counterstrike, how you have to touch the hostage and then they follow you back to the rescue zone.
- r00k
- Posts: 1110
- Joined: Sat Nov 13, 2004 10:39 pm
Effectively you need to create an AI with two states, searching and following.
It will begin in the searching state, where every second or so it does a findradius to see if there's a player nearby. If there is it switches to the following state, where it chases after the player.
It's not too hard to code, but if you can't code it based on that breakdown you need to go off and learn so more qc first. Try a few more tutorials, especially the AI Cafe ones.
It will begin in the searching state, where every second or so it does a findradius to see if there's a player nearby. If there is it switches to the following state, where it chases after the player.
It's not too hard to code, but if you can't code it based on that breakdown you need to go off and learn so more qc first. Try a few more tutorials, especially the AI Cafe ones.
Apathy Now!
-

MauveBib - Posts: 634
- Joined: Thu Nov 04, 2004 1:22 am
..And for the AI Cafe tutorials you will need to go here:
http://quakewiki.net/archives/aicafe/tutorial/main.htm
http://quakewiki.net/archives/aicafe/tutorial/main.htm
-

xaGe - Posts: 461
- Joined: Wed Mar 01, 2006 8:29 am
- Location: Upstate, New York
16 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest