View previous topic :: View next topic |
Author |
Message |
Madfox

Joined: 15 Jan 2005 Posts: 36 Location: Holland
|
Posted: Fri Oct 23, 2009 9:52 pm Post subject: |
|
|
At this point I´m able to make a new model, that starts in standframe on land as well as when it´s in water.
As soon as the player is in view it start its attack.
On land it starts walking and follows the player into the water and starts swimming.
In water it starts swimming and shoots harpoons.
The only thing I am not sure about is :
how do I get a Quake1 monster out of the water on land?
As it seems code technical impossibe, since the engine has no support for it. |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA
|
Posted: Fri Oct 23, 2009 10:29 pm Post subject: |
|
|
might have to do with this...
.float waterlevel; // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
if 0 change ai behavior and animation and if 2 change ai behavior and animation? _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Sat Oct 24, 2009 1:18 am Post subject: |
|
|
hrm? everything works, but the monster doesn't attempt to walk out of water?
movetogoal with ent.flags&FL_SWIM will refuse to move the ent out of water.
If you set ent.flags&FL_FLY instead, then it will move out of water, but then it'll also happily fly up and out of water too.
FL_SWIM will let the top of the monster move out of water, just not its origin. If you check to see if the top of your monster is outside water (self.waterlevel < 3), and if the water below is shallow (pointcontents(self.origin-'0 0 16') then you can switch it to land-based (clear FL_SWIM).
You might want to set FL_PARTIALGROUND when you clear the FL_SWIM flag in order to avoid it making a thud sound.
Or something. _________________ What's a signature? |
|
Back to top |
|
 |
Madfox

Joined: 15 Jan 2005 Posts: 36 Location: Holland
|
Posted: Sun Oct 25, 2009 6:26 pm Post subject: |
|
|
Yes thanks a lot!
I know it sounds stupid, and I believe you may be right.
Thing is I haven't an idea where to look for these things in the qc.
I believe I end up with blindly changing statements to see what happens.
So to make it more clear, here's the file.
Maybe then it is more simpel to point out the case.
http://members.home.nl/gimli/harpio.zip
 |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA
|
Posted: Sun Oct 25, 2009 6:30 pm Post subject: |
|
|
when ever im trying to make or change something i havnt done before. i always look in defs.qc and at other entities which might be similar. _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
MeTcHsteekle
Joined: 15 May 2008 Posts: 397 Location: its a secret
|
Posted: Sun Oct 25, 2009 11:10 pm Post subject: |
|
|
maybe make frogman do a fiend leap out of the water like in that fiend mod where they can jump to the player no matter what {almost} _________________ bah |
|
Back to top |
|
 |
|