Forum Thread
  Posts  
Freeze for Q2 (Forums : Coding & Scripting : Freeze for Q2) Locked
Thread Options
Mar 25 2003 Anchor

How can i make a freeze tag for Q2?

--

Hmmm...

Mar 25 2003 Anchor

Code it.

--

User Posted Image

Mar 25 2003 Anchor

Concept, design, implimentation, maintenence.

--

Why wont it save me?

Mar 25 2003 Anchor

Just implementation. He's not trying to make a mod, he's trying to learn how to mod. He wants a tutorial.

--

User Posted Image

Mar 25 2003 Anchor

yep, i need the code, i know it is something in p_weapon.c orso ;)

mwhoa i need the code so if u shoot a specified weapon the enemy/player freezes after hit by the bullet, and turns and sees blue for 5 seconds orso. It cant move. After 5 seconds it defrosts.
If the HP is 1 and then shoot with a freeze bullet it wont die, it freezes, if u shoot it on 1HP when its frozen it will die. Every time u shoot it it substracts 20HP and adds freeze effect.

How can i make this happen? I know with coding, but how...?

--

Hmmm...

Mar 26 2003 Anchor

common, there must be a freeze script... Help me please... :(

--

Hmmm...

May 26 2003 Anchor

help?

--

Hmmm...

PsychoFarmer
PsychoFarmer modDB King
May 26 2003 Anchor

ai yi yi, calm down... no need to triple post within 24 hours

--

___________________________
Today seems like a good day to burn a bridge or two
I am the freakiest man in the world!!!!
I beg to differ, on the contrary, I agree with every word that you say

User Posted Image

May 27 2003 Anchor

Well, I'm assuming you know a bit about Quake 2 coding, because I don't, but I could help you.

First, add this variable to the main entity structure, whatever that may be:
int frozentime;

Make sure it's initialized to 0 before a game starts and when you respawn.

Then, add a freeze gun.
In the damage function, add this in real code:

if (attacker.weapon == freezegun && target.health > 0)
{
target.health -= 20;
if (target.health < 1)
target.health = 1;
target.frozentime = 0.1;
}

I have no idea how to do it but you should find some player function that's called at 10 frames per second, this is usually where the animation is handled too. Add:
if (self.frozentime)
{
self.frozentime += 0.1;
localcmd (self, "v_cshift 0 255 255 128\n"); // this probably wont make any sense in quake2... for one thing i heard you have to hack in a localcmd function...
self.effects |= EF_BLUE; // ?
}
if (self.frozentime > 5)
self.frozentime = 0;

Then, somehow make the player unable to move if (self.frozentime). I can't help you there.

This is probably very complete, but it should be a step in the right direction.

--

User Posted Image

May 27 2003 Anchor

uuuuuuhh... just started a week ago in coding '¬_¬

--

Hmmm...

May 31 2003 Anchor

Well then I can't help you any further. If you can't find any tutorials, get on the quakesrc.org forums and ask on the Quake2 DLL coding forum.

--

User Posted Image

chis
chis Old man.
May 31 2003 Anchor

SeienAbunae wrote: Code it.


what a nice bit of advice :)

--

Nothing.

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.