Announcement

Collapse
No announcement yet.

qc

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    And we all know that define you did, even though you mean define in a different way.

    When it comes to Quake engine code, I know ZERO. I've been tempted to find an old source, rip it apart and "grasp" it, but it would just be another distraction. I have what ?6? projects going...lol. It's retarded. I need to start knocking them out 1 at a time.

    I live in this F'd up land (my head) where no matter how much I have to think and create I never feel fulfilled and once I have the entire scope, the puzzles are primarily solved and I can see "the end", I get bored cause there is no challenge left. I trudge through finishing and it's torture. This is how the projects just keep building up. I never completely abandon any of them, but I need that ?WTF am I doing? factor, so more projects get invented.

    I actually got pissed at parsing delimiters. I was rolling and everything was hard. There came a point where challenges had me totally stumped, sometimes for days...then POOF, there was nothing that I couldn't make it do. That's gonna change though. I'll be going back to it soon to make it do things that I don't understand at all. LOL

    aside: I told you you deserve beer, but that's why I don't remember 10 years ago...lol. I've only been sober for 9 and before that, I was never sober.

    also to stay on topic

    Code:
    float x = 10;
    floats are number values in qc.
    Last edited by MadGypsy; 05-03-2013, 11:24 PM.
    http://www.nextgenquake.com

    Comment


    • #47
      qc is really great, easy, but take months -or years- to learn to make cool stuff, if you not are a programmer. I do not understand english at all, i didn�t stude it, so was difficult to me But i believe i get cool stuff (aniway my qc is no clean ) i think the best way to learn is: write code, read code. Start changing some values -like numbers and stuff- see examples, read and do every0 (yes EVERY) tutorials on inside 3d, copy code from another mods (either you do not know what are you copyinf exactly). But, with this jedstoner please do not be bored, qc is great and you can do great stuff , but please, read and do EVERY the tutorials in inside3d!! you will learn a lot of qc so with this stuff done, your questions will be easy to understand and reply, if i write on inside 3d "hello How can i make a plasma gun? " maybe the question is bad, if my question is more specific like "what�s are the functions of "normalize" of "makevectors?" the requests will be more specific and constructives my suggestion is = do every tutorials on inside 3d,
      the invasion has begun! hide your children, grab the guns, and pack sandwiches.

      syluxman2803

      Comment


      • #48
        nahuel thanks for posting. i have a lot of respect for you guys that can coad in a language that is not yours. i tryed my hand at moding the mario wii game and that was hard cose hafe of the file names were Japaneses. i looked at the earthquake coad at inside3d that was a little much for today. so i think next up is to get my nails in the wall. but only after i finish my cosshair homework. (and at some point i need to clean the house lol)

        Comment


        • #49
          Originally posted by JDSTONER View Post
          . i looked at the earthquake coad at inside3d that was a little much for today.
          hello jedstone, ypu can copy the entinre eartquake code from rogue mission pack

          float earthquake_active;
          float earthquake_intensity;
          float EQ_RANDOM = 1.000;

          void () stop_earthquake;

          void () earthquake_rumble = {

          if ( (self.attack_finished < time) ) {

          stop_earthquake ();

          } else {

          sound (self,CHAN_VOICE,"equake/rumble.wav",TRUE,ATTN_NONE);
          self.think = earthquake_rumble;
          self.nextthink = (time + TRUE);

          }

          };

          void () start_earthquake = {

          earthquake_active = TRUE;
          if ( (self.spawnflags & EQ_RANDOM) ) {

          self.attack_finished = (time + (random () * self.delay));

          } else {

          self.attack_finished = (time + self.delay);

          }
          earthquake_rumble ();

          };

          void () stop_earthquake = {

          earthquake_active = FALSE;
          self.think = start_earthquake;
          if ( (self.spawnflags & EQ_RANDOM) ) {

          self.nextthink = (time + (random () * self.wait));

          } else {

          self.nextthink = (time + self.wait);

          }

          };

          void () earthquake = {

          if ( !self.delay ) {

          self.delay = 20.000;

          }
          if ( !self.wait ) {

          self.wait = 60.000;

          }
          if ( !self.weapon ) {

          self.weapon = 40;

          }
          precache_sound ("equake/rumble.wav");
          earthquake_active = FALSE;
          earthquake_intensity = (self.weapon * 0.500);
          setsize (self,VEC_ORIGIN,VEC_ORIGIN);
          self.think = stop_earthquake;
          self.nextthink = (time + TRUE);

          };

          void () earthquake_touch = {

          if ( self.delay ) {

          if ( (self.attack_finished < time) ) {

          sound (self,CHAN_VOICE,"equake/rumble.wav",TRUE,ATTN_NORM);
          self.attack_finished = (time + TRUE);

          }
          if ( (other.classname == "player") ) {

          if ( (other.flags & FL_ONGROUND) ) {

          other.velocity_x = ((other.velocity_x + ((random () * self.weapon) * FL_SWIM)) - self.weapon);
          other.velocity_y = ((other.velocity_y + ((random () * self.weapon) * FL_SWIM)) - self.weapon);
          other.velocity_z = ((other.velocity_z + ((random () * self.weapon) * FL_SWIM)) - self.weapon);

          }

          }

          }

          };

          void () earthquake_use = {

          self.delay = !self.delay;

          };

          void () trigger_earthquake = {

          precache_sound ("equake/rumble.wav");
          if ( !self.weapon ) {

          self.weapon = 40;

          }
          self.weapon = (self.weapon * 0.500);
          self.delay = TRUE;
          self.touch = earthquake_touch;
          if ( self.targetname ) {

          self.use = earthquake_use;
          self.delay = FALSE;

          }
          InitTrigger ();

          };

          void () kill_earthquake = {

          local entity eq;

          if ( (other.classname != "player") ) {

          return ;

          }
          eq = find (world,classname,"earthquake");
          if ( (eq != world) ) {

          earthquake_active = FALSE;
          remove (eq);

          }

          };

          void () trigger_earthquake_kill = {

          self.touch = kill_earthquake;
          InitTrigger ();

          };


          paste this at the bottom of "triggers.qc"
          the invasion has begun! hide your children, grab the guns, and pack sandwiches.

          syluxman2803

          Comment


          • #50
            hmmm, I did it differently. If I mix my way and your way, it will be even better, thanks for posting that.

            @JD - you will probably want to put a "rumble.wav" in a folder named equake. (Just my opinion) - You will want to find a better sound than the one in rogue. It's really quite bad and it doesn't sync properly with untouching the trigger. Probably because the default wav is just too long.

            Aside: my new way to do this would be to paste nahuels code in an earthquake.qc and add it in progs.src under triggers.qc. This way it is modular and can simply be commented out if you chose not to use it.
            Last edited by MadGypsy; 05-04-2013, 06:24 PM.
            http://www.nextgenquake.com

            Comment


            • #51
              will nahuel way still hook in to the ent file? i can try and find out but im STILL working on my homework but maybe you know off the top of your head MG

              Comment


              • #52
                yes it will. My ent definition is the proper one for the rogue earthquake. Nahuels code and mine are identical...cause I did the same thing, ripped it from rogue.

                Where our ways differ is irrelevant, the codes will run the same. I just put the global vars (at the top) in defs.qc, in the same spot rogue did and turned the rest of the code into it's own script (ie...I did not paste it in triggers.qc)

                I like nahuels code because the earthquake could be commented out before compile (to remove useless bloating if it wasn't being used) and it won't even leave behind it's global vars in defs.qc. Also (my taste) I like my scripts to be separate. There is a trigger_earthquake and that makes sense to be put in triggers.qc, but by not putting it in triggers.qc you know that earthquake.qc is literally all of the earthquake code, plus what I said earlier about commenting it out.
                http://www.nextgenquake.com

                Comment


                • #53
                  However, there is one lil bitty problem with nahuels code, and it isn't nahuels fault or rogues, it's QuakeOne's. The forum has stripped all of the formatting from the code and it makes it complicated to determine the nesting. If you give me a few minutes I will post the exact same thing, but formatted. It will be much easier to read.

                  gimme like ...2 minutes
                  http://www.nextgenquake.com

                  Comment


                  • #54
                    Code:
                    // earthquake
                    
                    // ============================================================
                    // Level-Wide Earthquakes
                    // ============================================================
                    
                    float 	earthquake_active;
                    float	earthquake_intensity;
                    float 	EQ_RANDOM 		= 1;
                    
                    void() stop_earthquake;
                    
                    void() earthquake_rumble =
                    {
                    	if (self.attack_finished < time)
                    		stop_earthquake();
                    	else
                    	{
                    		sound( self, CHAN_VOICE, "equake/rumble.wav", 1, ATTN_NONE );
                    		self.think = earthquake_rumble;
                    		self.nextthink = time + 1;
                    	}
                    }; 
                    
                    void() start_earthquake =
                    {
                    	earthquake_active = 1;
                    	if ( self.spawnflags & EQ_RANDOM )
                    		self.attack_finished = time + random() * self.delay;
                    	else
                    		self.attack_finished = time + self.delay;
                    	earthquake_rumble();
                    };
                    
                    void() stop_earthquake =
                    {
                    	earthquake_active = 0;
                    	self.think = start_earthquake;
                    	if ( self.spawnflags & EQ_RANDOM )
                    		self.nextthink = time + random() * self.wait;
                    	else
                    		self.nextthink = time + self.wait;
                    };
                    
                    /*QUAKED earthquake (0 1 0) (-8 -8 -8) (8 8 8) Random
                    The Earthquake generator.
                    
                    delay - duration of the tremor (default 20)
                    wait - time between tremors (default 60)
                    weapon - richter scale of movement (default 40)
                    
                    RANDOM affects the times only. It will change the randomly between
                    0-n where n is the duration or time between.
                    
                    weapon - if you give a weapon value of 40, the X and Y displacement 
                    can vary between -20 and +20, a range of 40.
                    */
                    void() earthquake =
                    {
                    	if (!self.delay)
                    		self.delay = 20;
                    	if (!self.wait)
                    		self.wait = 60;
                    	if (!self.weapon)
                    		self.weapon = 40;	
                    	
                    	precache_sound ("equake/rumble.wav");
                    	earthquake_active = 0;
                    	earthquake_intensity = self.weapon * 0.5;
                    	
                    	setsize (self, '0 0 0', '0 0 0');
                    	self.think = stop_earthquake;
                    	self.nextthink = time + 1;
                    };
                    
                    // ============================================================
                    // Earthquake trigger
                    // ============================================================
                    void() earthquake_touch = 
                    {
                    	if (self.delay)
                    	{
                    		if ( self.attack_finished < time )
                    		{
                    			sound ( self, CHAN_VOICE, "equake/rumble.wav", 1, ATTN_NORM );
                    			self.attack_finished = time + 1;
                    		}			
                    		
                    		if ( other.classname == "player" )
                    		{
                    			if ( other.flags & FL_ONGROUND )
                    			{
                    				other.velocity_x = other.velocity_x + 
                    									(random() * self.weapon * 2) -
                    									self.weapon;
                    				other.velocity_y = other.velocity_y + 
                    									(random() * self.weapon * 2) -
                    									self.weapon;
                    				other.velocity_z = other.velocity_z + 
                    									(random() * self.weapon * 2) -
                    									self.weapon;
                    			}
                    		}
                    	}
                    };
                    
                    void() earthquake_use = 
                    {
                    	self.delay = !self.delay;
                    };
                    
                    /*QUAKED trigger_earthquake (.5 .5 .5) ?
                    The Earthquake generator.
                    
                    Anytime a person is in an active field, they shake. If the trigger is a target, it will be OFF until triggered. It will then toggle between ON and OFF.
                    
                    weapon - richter scale of movement (default 40)
                    
                    weapon - if you give a weapon value of 40, the X and Y displacement 
                    can vary between -20 and +20, a range of 40.
                    */
                    void() trigger_earthquake =
                    {
                    	precache_sound ("equake/rumble.wav");
                    	
                    	if (!self.weapon)
                    		self.weapon = 40;	
                    	
                    	self.weapon = self.weapon * 0.5;
                    	self.delay = 1;
                    	self.touch = earthquake_touch;
                    
                    	if (self.targetname)
                    	{
                    		self.use = earthquake_use;
                    		self.delay = 0;
                    	}
                    
                    	InitTrigger();
                    };
                    
                    void() kill_earthquake =
                    {
                    	local entity 	eq;
                    
                    	if ( other.classname != "player" )
                    		return;
                    	
                    	eq = find (world, classname, "earthquake");
                    	if (eq != world)
                    	{
                    		earthquake_active = 0;
                    		remove (eq); 
                    	}
                    };
                    
                    /*QUAKED trigger_earthquake_kill (.5 .5 .5) ?
                    Trigger to kill the level-wide earthquake.
                    */
                    void() trigger_earthquake_kill =
                    {
                    	self.touch = kill_earthquake;
                    
                    	InitTrigger();
                    };
                    You can paste that at the end of triggers.qc, or you can make an earthquake.qc and add it under triggers.qc in progs.src. Either way will work the same. The only thing my way adds is an easy way to get rid of it

                    progs.src

                    earthquake available
                    Code:
                    triggers.qc
                    earthquake.qc
                    earthquake gone
                    Code:
                    triggers.qc
                    //earthquake.qc
                    of course in my source there is the SVQC folder. I just kept it simple. So you know, I will add this to my source since it is a map function.

                    Code:
                    SVQC/extra/earthquake.qc
                    will be my location. If you do the same you will basically have an update that I never released...lol
                    Last edited by MadGypsy; 05-04-2013, 06:54 PM.
                    http://www.nextgenquake.com

                    Comment


                    • #55
                      Brooooooo. I am a friggin moron. You remember that .fgd question you asked? Remember the crazy ass answer I gave you (that was right)? I have an even better answer for you and it has been staring me in the face for 2 years.

                      Code:
                      /*QUAKED trigger_earthquake (.5 .5 .5) ?
                      The Earthquake generator.
                      
                      Anytime a person is in an active field, they shake. If the trigger is a target, it will be OFF until triggered. It will then toggle between ON and OFF.
                      
                      weapon - richter scale of movement (default 40)
                      
                      weapon - if you give a weapon value of 40, the X and Y displacement 
                      can vary between -20 and +20, a range of 40.
                      */
                      There is your FGD/ENT info right there. If you look in my ent definition there is also a 'wait'. You can delete that. I never added it (lol). The comment above says it all. weapon needs to be set. Add the knowledge that, it is triggerable, so it has to have a targetname and voila, there's your ent.

                      targetname and weapon - the comment even tells you how the values work.

                      note: this is a special trigger, if it does not have a targetname it's just a non-stop earthquake, i think.

                      Code:
                      if(self.targetname)
                      {
                      //do something
                      }
                      
                      InitTrigger();
                      I think that means it will just run if no targetname is present. I'll give better answers later. If not, then this is kinda bad programming, there should be something that happens if no targetname is found, even if it was just.

                      Code:
                      if(self.targetname)
                      {
                      //do something
                      } else {
                      //remove self
                      return;
                      }
                      
                      InitTrigger();
                      EDIT: NOPE, this trigger will not just run. InitTrigger just makes it a trigger. I'll give you a mod to do.

                      turn the if(self.targetname) chunk to this
                      Code:
                      	if (self.targetname)
                      	{
                      		self.use = earthquake_use;
                      		self.delay = 0;
                      	} else {
                      		dprint("woops, you forgot to add a targetname!\n");
                      	}
                      or maybe
                      Code:
                      	if (self.targetname)
                      	{
                      		self.use = earthquake_use;
                      		self.delay = 0;
                      	} else {
                      		objerror("woops, you forgot to add a targetname!\n");
                      		remove(self);	//I'm not a trigger yet
                      		return;
                      	}
                      If I'm right, that will print an error, remove itself and break processing of this (target_earthquake) function. There is a special way to remove triggers, but, this isn't a trigger yet, so I think this would fly. It's probably not necessary to remove it. That's some anal stuff right there. The real point is for you to go give it a targetname, whether you remove it or not you need to fix it.

                      EDIT 7000,0000: hmmm, there are a lot of things to ponder. Technically there really isn't anything to remove yet either. No model or solid of any kind has been set. Remove is probably 100% useless, skip to the return and it's a nothing. The one spot where I can see that I'm wrong though is, it is still a self. There is self being set before it becomes solid. So, somewhere that info is being stored. Maybe remove(self) isn't useless as it would free up that memory.

                      I don't have answers here, really, just 'ponderings' and unsurety.
                      Last edited by MadGypsy; 05-04-2013, 08:01 PM.
                      http://www.nextgenquake.com

                      Comment


                      • #56
                        Earthquake qc added thanks for the help ill post on hear agin when i brake something more

                        Comment


                        • #57
                          zoom the pic to see



                          ok so ive been making some changes using inside3d getting errors and fixing them on my own

                          but i dont know what happened hear it looks like the lava man had shamblers for dinner

                          i dont know why its popping shambler heads at the end credits of e1m7 i cant seem to find where it is in the qc so i can set it back to gib 1 2 3

                          if anyone knows it would be a grate help i did the killable boss but when i gib him in the game no issue just in the credits
                          Attached Files

                          Comment


                          • #58
                            the stuff in House of Chthon is done in the map, with teleporters and monsters that actually telefrag each other.

                            no qc.
                            Scout's Journey
                            Rune of Earth Magic

                            Comment


                            • #59
                              QuakeC can teach u things, just dont get stuck in this game. it will fail you.
                              Last edited by R00k; 05-10-2013, 12:15 AM.
                              www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

                              Comment


                              • #60


                                wow i feel like a fool GB i hope you did not hurt your self when you saw that question.

                                i guess its been too long sense i played quake and not a mod or map of quake
                                i never noticed the shambler heads before

                                me and my son have been playing and he was mad that we could not kill him with a gun so i did the mod and changed the rocket launcher in to lava ball launcher.

                                my skills are week compared to all of you but my 5yr old thinks im bill gates
                                Attached Files

                                Comment

                                Working...
                                X