Forum

I need gyro 2 help

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

I need gyro 2 help

Postby not_l33t » Sun Oct 08, 2006 10:35 am

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.
User avatar
not_l33t
 
Posts: 32
Joined: Sun Oct 08, 2006 10:00 am
Location: Downunder

Postby Quake Matt » Sun Oct 08, 2006 11:27 am

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!
User avatar
Quake Matt
 
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Re: I need gyro 2 help

Postby GiffE » Sun Oct 08, 2006 3:41 pm

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;
GiffE
 
Posts: 170
Joined: Sun Oct 08, 2006 3:39 pm
Location: USA, CT

Postby not_l33t » Mon Oct 09, 2006 5:22 am

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.
User avatar
not_l33t
 
Posts: 32
Joined: Sun Oct 08, 2006 10:00 am
Location: Downunder

Postby not_l33t » Tue Oct 10, 2006 2:52 am

how do you make opjects have weight and can move when shot are hit by the player.
User avatar
not_l33t
 
Posts: 32
Joined: Sun Oct 08, 2006 10:00 am
Location: Downunder

Postby Quake Matt » Tue Oct 10, 2006 1:14 pm

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.
User avatar
Quake Matt
 
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm


Postby not_l33t » Wed Oct 11, 2006 12:49 am

i have read them. but i can't see where it says how to make a opject have mass.
User avatar
not_l33t
 
Posts: 32
Joined: Sun Oct 08, 2006 10:00 am
Location: Downunder

Postby Quake Matt » Wed Oct 11, 2006 11:37 am

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.
User avatar
Quake Matt
 
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Postby not_l33t » Thu Oct 12, 2006 1:58 am

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.
User avatar
not_l33t
 
Posts: 32
Joined: Sun Oct 08, 2006 10:00 am
Location: Downunder

Postby GiffE » Thu Oct 12, 2006 2:15 am

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
GiffE
 
Posts: 170
Joined: Sun Oct 08, 2006 3:39 pm
Location: USA, CT

Postby Quake Matt » Thu Oct 12, 2006 5:28 pm

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!
User avatar
Quake Matt
 
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Postby not_l33t » Mon Dec 18, 2006 9:52 am

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.
User avatar
not_l33t
 
Posts: 32
Joined: Sun Oct 08, 2006 10:00 am
Location: Downunder

Postby Quake Matt » Tue Dec 19, 2006 10:13 am

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.
User avatar
Quake Matt
 
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Postby not_l33t » Wed Jan 03, 2007 2:00 am

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.
User avatar
not_l33t
 
Posts: 32
Joined: Sun Oct 08, 2006 10:00 am
Location: Downunder

Next

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest