Inside3D!
     

spawn a monster

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



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Wed Mar 16, 2005 8:16 pm    Post subject: spawn a monster Reply with quote

I'd like to spawn a monster, in front of the player, I'm dumb, thick and stoopid.

Please can someone completely, and with no other details that what's above, write the neccessary code.

Or failing that politley push me vaguely in the right direction.

I blame me age, me long work hours and well, me idiocy.
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Thu Mar 17, 2005 12:34 am    Post subject: Reply with quote

That which you seek lies within the forest of Hipnotic Scourges. Once, there, see thee the mysteries buried within HIPSPAWN.QC. From there, take what you find, and apply it to the knowledge of thine ID created weapon, W_FireAxe.
_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
DarkSnow



Joined: 02 Mar 2005
Posts: 67
Location: Sweden

PostPosted: Thu Mar 17, 2005 6:40 am    Post subject: Reply with quote

Or.. Simply combine some relevant spawning stuff from weapons.qc - like spawning a rocket when firing rocketlauncher etc.

Then give it all the ai stuff as th_pain, th_stand as you find in the respective monster's qc file under its spawning void "monster_army()" etc.


I am not 100% sure, but atleast you are pushed in a direction Smile
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Gilgamesh



Joined: 26 Oct 2004
Posts: 67
Location: Brazil

PostPosted: Thu Mar 17, 2005 10:31 am    Post subject: Reply with quote

You need to move the precache stuff to another place, like in weapons.qc (at the top) or world.qc
_________________
#EOP
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Thu Mar 17, 2005 5:08 pm    Post subject: Reply with quote

Which is the beauty of the Hipnotic method. Namely, you don't have to redefine yet another monster spawn, and you don't clog up the global precache with stuff you might or might not use. Plus, you can write a single function to spawn just about any monster you've previously made spawn functions for, for a fraction of the code size needed if you did it the other way. Wink
_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
Gilgamesh



Joined: 26 Oct 2004
Posts: 67
Location: Brazil

PostPosted: Thu Mar 17, 2005 5:21 pm    Post subject: Reply with quote

Hmmm very nice....
I like the random monster spawning from the dpmod, it's very good too
_________________
#EOP
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Wazat



Joined: 15 Oct 2004
Posts: 732
Location: Middle 'o the desert, USA

PostPosted: Fri Mar 18, 2005 9:59 pm    Post subject: Reply with quote

Archmage also has summoning monsters. I *stole* -- erhem, borrowed/ported/(insert more benign verb here) the code into Wazat mod all those years ago.

I'll have to take a look at the Hipnotic code...
_________________
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.
Back to top
View user's profile Send private message MSN Messenger
andy



Joined: 05 Apr 2005
Posts: 1

PostPosted: Tue Apr 05, 2005 5:41 pm    Post subject: Reply with quote

hi i'm new to quake modding and quake C, I am creating my own single player bot called buddy, and I've all but done it but i just don't know how to make the bot spawn next to you or infront of you, all i can seem to do is get him at the spawn point which sucks. Anybody care to help a newbie?
Back to top
View user's profile Send private message
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Tue Apr 05, 2005 10:48 pm    Post subject: Reply with quote

makevectors (self.v_angle_y * '0 1 0');
org = self.origin + v_forward * '0 0 1';

After you have the org, you can simple setorigin(bot,org), but it would be better to use some sort of code that tests if that location is actually available (a walkmove(0,0) might work on this... make sure the bot is linked into the world with a setsize before this). If it isn't available you can either print a message like 'no room!' or have some code that tries to relocate the bot...
_________________
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Back to top
View user's profile Send private message
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