Announcement

Collapse
No announcement yet.

Mapping help

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

  • Mapping help

    hey, how would i make something that pushes the player in a certain direction and in turn giving him a speed small speed boost? iv seen it in maps before, usually they use it to keep people from going in a spawn or something.

  • #2
    Create a brush in your editor and change it's class to trigger_push. The brush will be invisible in game, but once you step inside it, it will push you in the direction and speed you set it to.

    Comment


    • #3
      i think i tried that, it sorta made a half assed low gravity effect basically u float around real slow but u can shoot normal and all that.

      EDIT: iv got worldcraft up now and in the properties for trigger_push it doesnt let me set a target or a direction for the push either.

      EDIT2: i edited my FGD so that i could give the Trigger_push a target but, it still doesnt work even with a target specifying a direction the speed is set to 100.
      Last edited by ceriux; 09-30-2008, 08:56 PM.

      Comment


      • #4
        http://hosted.planetquake.gamespy.co...rd/std9.shtm#8

        trigger_push

        description:

        Pushes player in a direction specified by the angle.

        keys/values:

        "speed" is the force of the push, in the direction of the angle

        flags:

        push_once - pushes once, then removes itself
        trigger_push it doesnt let me set a target or a direction for the push either
        According to the docs, you need to set the "speed" and the "angle".

        Setting the "target" isn't going to do anything whatsoever and QuakeC will ignore it.

        I would frequently refer to this reference for entity questions:

        http://hosted.planetquake.gamespy.co.../standard.shtm

        The QuakeC source for trigger_push (see it) gives some insight into what fields are read. As you can see, .target isn't referenced anywhere.

        I'm just showing you in part how to research this, since it looks like you are learning a lot of different skills it should help if you can see how it works in the scheme of things.

        Originally posted by triggers.qc QuakeC
        float PUSH_ONCE = 1;

        void() trigger_push_touch =
        {
        if (other.classname == "grenade")
        other.velocity = self.speed * self.movedir * 10;
        else if (other.health > 0)
        {
        other.velocity = self.speed * self.movedir * 10;
        if (other.classname == "player")
        {
        if (other.fly_sound < time)
        {
        other.fly_sound = time + 1.5;
        sound (other, CHAN_AUTO, "ambience/windfly.wav", 1, ATTN_NORM);
        }
        }
        }
        if (self.spawnflags & PUSH_ONCE)
        remove(self);
        };


        /*QUAKED trigger_push (.5 .5 .5) ? PUSH_ONCE
        Pushes the player
        */
        void() trigger_push =
        {
        InitTrigger ();
        precache_sound ("ambience/windfly.wav");
        self.touch = trigger_push_touch;
        if (!self.speed)
        self.speed = 1000;
        };
        Last edited by Baker; 09-30-2008, 10:50 PM.
        Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

        So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

        Comment


        • #5
          thanks, ill see what i can do lemme play with it a little more

          Comment


          • #6
            awsome it worked, before i try and just fail because its not possible, is it possible to set it up with a trigger_multiple with a wait period after each time its disabled?


            basically i want the player to touch this "trigger_push" with a sprite floating where it is, and then it pushes them then makes the sprite and the "trigger_push" to turn off for lets say... 10 seconds and if its not possible is it moddable via the fgd and custom entitie qc code?

            Comment


            • #7
              Unfortunately, vanilla quake does not have that feature. It'd not be that difficult to code, assuming you know some qc. Add a .use function for trigger_push entities (which are used by trigger_multiple) which turns on/off the push effect.

              Another option would to try making a moving tunnel that makes the player's path go around the push block for the ten seconds you want. I don't know if this can be made to look that good, but you wouldn't have to code anything, nor require that people use your mod to play the level.

              Comment


              • #8
                Well, its actually for a mod im developing it wont be for vanilla quake.

                Here's actually what i want:

                player hits trigger_push like a pick up and it goes away,
                10 seconds later the entitie turns its self back on after being ran over, so the next player running by can use it.



                i saw something when messing around with entities that might work, basically i would need 3 flags.
                "delay before rest,starts on, and one that projects a sprite while its on"

                or possibly something with the toggle flag?

                EDIT: what iv made so far....

                Code:
                @SolidClass base(Targetname) = trigger_push2 : "Trigger player push"
                [
                	
                	speed(integer) : "Speed of push" : 10
                        wait(string) : "Delay before reset" : "10"
                        count(integer) : "Count before activation" : 0
                	spawnflags(flags) =
                	[
                	1 : "Player only" : 0	
                        2: "Toggle" : 0
                	]
                
                ]
                Last edited by ceriux; 10-01-2008, 02:06 AM.

                Comment


                • #9
                  You are editing a file that tells the editor what attributes an entity can have. It has no effect on the game at all. You would need to make a QuakeC patch like explained above.
                  Quake 1 Singleplayer Maps and Mods

                  Comment


                  • #10
                    thats what im wanting to do atm , is give the needed attributes to trigger_push for it to work? or will that not work at all? if so i guess i need to head over to inside3d to get some direction into how to code it, i still have no idea how to code something from scratch it seems i can understand the code, edit it, but not write my own....

                    oh and so far thank you guys for your help its much appreciated!

                    Comment


                    • #11
                      you will need to make a function called trigger_push2 and compile it. Just for fun, here it is in quakec:

                      Code:
                      void () trigger_push2_touch;
                      
                      void () trigger_push2_rearm =
                      {
                      	self.touch = trigger_push2_touch;
                      };
                      
                      void () trigger_push2_touch =
                      {
                      	if (other.classname == "player")
                      	{
                      		other.velocity = self.speed * self.movedir * 8;
                      		self.touch = SUB_Null;
                      		self.think = trigger_push2_rearm;
                      		self.nextthink = time + self.wait;
                      	}
                      
                      };
                      
                      void () trigger_push2 =
                      {
                      	InitTrigger ();
                      	self.touch = trigger_push2_touch;
                      };
                      This will take the .wait value you're creating in your map editor, and it still requires the regular .speed and .movedir values, too.
                      Last edited by Zop; 10-02-2008, 01:41 AM.

                      Comment


                      • #12
                        so id just add trigger_push2 into the FGD and it all should work right? (after i compiled it into my progs.dat of course?)

                        Comment


                        • #13
                          Whatever it takes to make an entity with trigger_push2 as the classname and a representative volume of area, in the map you're designing. (I don't know what FGD is.)

                          Comment


                          • #14
                            the FGD is what tells worldcraft all of the entites

                            Comment

                            Working...
                            X