Inside3D!
     

spawing monsters

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Jukki



Joined: 07 Apr 2010
Posts: 19

PostPosted: Sun Aug 01, 2010 5:27 am    Post subject: spawing monsters Reply with quote

hello hello. game wich i am making is round based. There will be unlimited amount of them. Every round there will spawn more and more zombies. my question is

1. how i can make them spawn in right place (my old code MADE them spawn but to origon. (middle)

2.then how i make them spawn so they dont get on top of each other.

i would realy be happy if you help me with this. I am still dump...

(btw. i am using lil modified knight)
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Arkage



Joined: 19 Nov 2009
Posts: 27

PostPosted: Sun Aug 01, 2010 5:36 am    Post subject: Reply with quote

Have look at the select spawn point code for the players re-spawn, I cant remember the function name. Then copy it to work with you spawn entity, eg, info_zombie_spawn.

You will then need to edit the monsters main function to take a vector as a parameter.

Then you will need to store a copy of self, set the position of the monster and then restore self (self in this case will be the player as the match has already started when the zombies are spawning) to the back up (I had the odd bug where I was the monster with out it Smile ).

Then just in you wave code pick a random spawn and call the monsters spawn function. I think there is a thread on here that deals with some thing similar.

Note: parts of what i have said might not make sense, it 6.35 am.
Back to top
View user's profile Send private message
Jukki



Joined: 07 Apr 2010
Posts: 19

PostPosted: Sun Aug 01, 2010 5:41 am    Post subject: Reply with quote

Arkage wrote:
Have look at the select spawn point code for the players re-spawn, I cant remember the function name. Then copy it to work with you spawn entity, eg, info_zombie_spawn.

You will then need to edit the monsters main function to take a vector as a parameter.

Then you will need to store a copy of self, set the position of the monster and then restore self (self in this case will be the player as the match has already started when the zombies are spawning) to the back up (I had the odd bug where I was the monster with out it Smile ).

Then just in you wave code pick a random spawn and call the monsters spawn function. I think there is a thread on here that deals with some thing similar.

Note: parts of what i have said might not make sense, it 6.35 am.


yes i tryed to copy paste and edit player respawn function but no succes

and yes there was a post by samuk BUT he spawning was where the old died

what you mean by copy of selfO.o?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Arkage



Joined: 19 Nov 2009
Posts: 27

PostPosted: Sun Aug 01, 2010 5:56 am    Post subject: Reply with quote

local entity old_self;
old_self = self;

// set the monster origin

self = old_self;

Self in this case points to the player so if set the origin with out doing that it would change the players origin.

That thread by Sam is the one I meant. The Principals are the same, instead of spawning it at the spot where the pod died give it the co ords of the spawn point.
Back to top
View user's profile Send private message
Jukki



Joined: 07 Apr 2010
Posts: 19

PostPosted: Sun Aug 01, 2010 6:00 am    Post subject: Reply with quote

ok thx arkage

so basicaly. i could merge sams and player spawn together?

and thanx for that self thing
Back to top
View user's profile Send private message Send e-mail MSN Messenger
frag.machine



Joined: 25 Nov 2006
Posts: 728

PostPosted: Sun Aug 01, 2010 3:10 pm    Post subject: Reply with quote

Jukki wrote:
ok thx arkage

so basicaly. i could merge sams and player spawn together?

and thanx for that self thing


I suggest you read the cited code an try to understand what's happening instead of just copy, paste & pray to work. Smile
_________________
frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/
Back to top
View user's profile Send private message Visit poster's website
hondobondo



Joined: 26 Sep 2006
Posts: 101

PostPosted: Sun Aug 01, 2010 4:13 pm    Post subject: Reply with quote

go here:

http://www.moddb.com/members/hondobondo/downloads/classic-bondo-mod-collection and look at gfdmsp.exe

look at the code under misc, dmsp.qc. you'll need to track down all the variables and function calls in world.qc and defs.qc. this is from aardappel's dmsp mod. it will solve all your problems. the two functions in dmsp.qc will both select a spawn point and cycle to the next empty spawn point. i even figured out a way to spawn a mob instead of just one monster, but that's not in there

if you want i could probably email this one file. it's pretty small
Back to top
View user's profile Send private message
Jukki



Joined: 07 Apr 2010
Posts: 19

PostPosted: Sun Aug 01, 2010 6:04 pm    Post subject: Reply with quote

thx all. arkage especialy ( he helped me with this Razz )

i made zombies spawn in different round Very Happy and to monster_knight etity i am gona use that thing you gaved me hono boy because the spawn to same place >__<
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group