Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Monster drop weapon and/or key

| Inside3d Forums Forum Index -> Mapping

View previous topic :: View next topic
Author | Message
--- | ---
Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Thu Feb 11, 2010 1:53 pm Post subject: Monster drop weapon and/or key |

I think I've read it is possible to have a monster drop a key or a weapon upon death, but I can't seem to find this information. Is it possible? _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Thu Feb 11, 2010 2:43 pm Post subject: |

Looks like you have an weapon and/or ammo appear in the monster backpack by adding, say, "weapon" "8" // SNG "ammo_nails" "10" to the monster_whatever entity But it doesn't actually throw the nailgun weapon model. But you get the weapon with the backpack.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...

Back to top |

frag.machine Joined: 25 Nov 2006 Posts: 728 |

Posted: Thu Feb 11, 2010 2:47 pm Post subject: |

You can make self drop a backpack with stuff simply adding the desired item to the entity's inventory and the callling DropBackPack() during its death sequence (see ogre.qc or soldier.qc for examples). Don't remember if it will work with keys, but things like ammo and weapons work fine. Of course, visually you'll always see a backpack model, so you may want to write your own function to drop the correct model according the item.
_________________
frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA |

Posted: Thu Feb 11, 2010 3:12 pm Post subject: |

yeah, i would just make your own function which drops the exact same stuff (nother words a copy of the original) and just replace the .mdl with the key or what ever and make the inventory of the back pack the key, gun, what ever. _________________
QuakeDB - Quake ModDB Group

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Thu Feb 11, 2010 3:24 pm Post subject: |

monsters drop stuff because they piggyback the player's drop code. weapons, ammo can be dropped. powerups and keys cannot normally be dropped. that said, keys are not special, and you can probably achieve the same effect by setting the .weapon field to IT_KEY1 or so, by hijacking the weapon dropping code. I just hope it doesn't automatically switch...
Of course, it'll have the regular backpack model. It'll only last for 2 mins max, and it may fall down somewhere that is inaccessible (lava pit, anyone?).
If you want a key to drop properly, you'll need QC code to explicitly do it.
On the other hand, having the monster death trigger a massive drawbridge that swivels down out of the rockface over lava to reveal the much desired key would give a slightly more epic feel to your map. And it would slow down those quakedonequick people a bit, too. Its funny watching them wait.
_________________
What's a signature?

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Thu Feb 11, 2010 11:52 pm Post subject: |

ceriux wrote:
yeah, i would just make your own function which drops the exact same stuff (nother words a copy of the original) and just replace the .mdl with the key or what ever and make the inventory of the back pack the key, gun, what ever.

frag.machine noticed I'm trying to stick within the confines of stock progs 1.06.
I'm trying to stick with the base set of features and take them as far as they will go.
If I were going to make QC modifications, I'd borrow the item throw from back2forwards. I think back2forwards is a super-classic single player release.

Spike wrote:
On the other hand, having the monster death trigger a massive drawbridge that swivels down out of the rockface over lava to reveal the much desired key would give a slightly more epic feel to your map. And it would slow down those quakedonequick people a bit, too. Its funny watching them wait.

Heheh, well ...
My stock progs 1.06 soon-to-be single player release uses .alpha and rotating entities so I think I can safely assume that the speed runners will not like my map
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> Mapping | 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