I need gyro 2 help

Discuss programming in the QuakeC language.
not_l33t
Posts: 32
Joined: Sun Oct 08, 2006 10:00 am
Location: Downunder
Contact:

I need gyro 2 help

Post by not_l33t »

i am trying to install the gyro 2 plugin into clean QC code. i am using QuakeC 106.

here are the problems i am having

when i remove the line

void(entity e) remove = #15; (like it says in the tut)

i get this error

error: subs.qc:5:Unknown value "remove"
warning: subs.qc:25:SetMovedir: not all control paths return a value
error: subs.qc:188:Unknown value "remove"
error: subs.qc:253:Unknown value "remove"


but when i leave it in i get this error

warning: subs.qc:25:SetMovedir: not all control paths return a value
warning: ai.qc:368:FindTarget must return a value
warning: ai.qc:588:CheckAnyAttack must return a value
warning: items.qc:47:droptofloor: Too few parameters
error: world.qc:343:Unknown value "Gyro_Run"

can someone help me out.
Quake Matt
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Post by Quake Matt »

Sounds like you haven't added the four Gyro files to your progs.src file.

Once you've copied them into mod's source, along with all the other .qc files, you'll need to open progs.src with a text editor. This file tells the compiler which .qc files it needs to load and in what order. You need to add them after defs.qc, like this:

Code: Select all

../progs.dat

defs.qc

gyro_main.qc
gyro_physics.qc
gyro_forces.qc
gyro_user.qc

subs.qc
fight.qc
ai.qc
combat.qc
items.qc
weapons.qc
world.qc
client.qc
player.qc
monsters.qc
doors.qc
buttons.qc
triggers.qc
plats.qc
misc.qc

ogre.qc
demon.qc
shambler.qc
knight.qc
soldier.qc
wizard.qc
dog.qc
zombie.qc
boss.qc

tarbaby.qc		// registered
hknight.qc		// registered
fish.qc			// registered
shalrath.qc		// registered
enforcer.qc		// registered
oldone.qc		// registered
Hope this helps! I'm still working slowly on Gyro 2.1, but writing the documentation is so boring, I can only manage it for about half and hour at a time! And I've completed Dead Rising now, so I'm less prone to being distracted by it!
GiffE
Posts: 170
Joined: Sun Oct 08, 2006 3:39 pm
Location: USA, CT
Contact:

Re: I need gyro 2 help

Post by GiffE »

I had this problem too or one similar to it.

I solved it by not deleting the line

Code: Select all

void(entity e) remove				= #15;
but by replacing it like this:

Code: Select all

void(entity e) remove;
not_l33t
Posts: 32
Joined: Sun Oct 08, 2006 10:00 am
Location: Downunder
Contact:

Post by not_l33t »

thanks its working. i miss read the tut where it told me to add it to the progs.dat file. it works now thanks. you are both going in the readme lol.
not_l33t
Posts: 32
Joined: Sun Oct 08, 2006 10:00 am
Location: Downunder
Contact:

Post by not_l33t »

how do you make opjects have weight and can move when shot are hit by the player.
Quake Matt
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Post by Quake Matt »

All physics objects have mass greater than zero. You can't create them any other way since the function to set an object as a physics entity is this:

Code: Select all

Gyro_Object_Activate(entity obj, float mass)
The mass won't do anything however, until you've either given the object some physics properties (like bouyancy or aerodynamics) or you've created some forces.

For rockets and grenades, just create a sphere-like force upon impact to represent the explosion. For nails and shotgun traces, you'll either have to be creative or wait until Gyro 2.1, since it has a new cylindrical/conical falloff component.
not_l33t
Posts: 32
Joined: Sun Oct 08, 2006 10:00 am
Location: Downunder
Contact:

Post by not_l33t »

i have read them. but i can't see where it says how to make a opject have mass.
Quake Matt
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Post by Quake Matt »

Part 3 - Floating Pineapples, about three paragraphs down:

Code: Select all

	setmodel (missile, "progs/grenade.mdl");
	setsize (missile, '0 0 0', '0 0 0');		
	setorigin (missile, self.origin);

	Gyro_Object_Activate(missile, 800);
This will instruct Gyro to treat the grenade as a physics object with mass 800, just as the macro did, but without any other physical properties such as bouyancy.
It'll then cover adding physical properties to the object, starting with bouyancy. The final part of the tutorial adds a simple force, too, which relies on the object's mass.
not_l33t
Posts: 32
Joined: Sun Oct 08, 2006 10:00 am
Location: Downunder
Contact:

Post by not_l33t »

ok thanks. now i jave been looking for the part/s of code that dose the objects such boxs, player ect. where can i find this code i have look all over the place and did not find it, i may have missed it.

also with the mass thing would u wright 1kg in grams (1000)
http://bradshub.ath.cx - take a look at my web site.

Come on, admit it. You're the smartest person you know.
GiffE
Posts: 170
Joined: Sun Oct 08, 2006 3:39 pm
Location: USA, CT
Contact:

Post by GiffE »

not_l33t wrote:ok thanks. now i jave been looking for the part/s of code that dose the objects such boxs, player ect. where can i find this code i have look all over the place and did not find it, i may have missed it.

also with the mass thing would u wright 1kg in grams (1000)
You can apply physics to objects spawned by the bsp the same way, open up items.qc go to item_health and at the end of the function:
Gyro_Object_Activate(self, 800);

Then ur grenades can blow the health box around aswell :D
Quake Matt
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Post by Quake Matt »

I didn't cover making solid entities into physics objects in the tutorial, partly because it's the same as with point entities and partly because there's a bug with it in 2.0!

As for mass, you're free to use any unit you feel comfortable with. I personally measure the mass in grams, but it'll work just as well with kilograms, pounds, tonnes, whatever, providing you keep it consistent throughout your mod.

Although, the whole mass thing kinda breaks down when you start turning monsters and players into physics objects, since it never takes volume into account, and larger objects should be hit by more of the force...

Best thing to do is experiment - fiddle around until you get the effect you want!
not_l33t
Posts: 32
Joined: Sun Oct 08, 2006 10:00 am
Location: Downunder
Contact:

Post by not_l33t »

i did that health pack thing but its still dose not move. HELP PLEASE :?
http://bradshub.ath.cx - take a look at my web site.

Come on, admit it. You're the smartest person you know.
Quake Matt
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Post by Quake Matt »

It's probably best that you wait for me to release version 2.1. I've made a lot of fixes to it, so you'll have a much easier time getting it to work.
not_l33t
Posts: 32
Joined: Sun Oct 08, 2006 10:00 am
Location: Downunder
Contact:

Post by not_l33t »

when will u be releasing 2.1 :?:
http://bradshub.ath.cx - take a look at my web site.

Come on, admit it. You're the smartest person you know.
Post Reply