Site Navigation
QuakeOne News
» Latest News
» News Archives
» QuakeOne Movies

QuakeOne Help
» File Downloads
» Quake Help
» Quake Servers

QuakeOne Community
» Forums
» Chat *new*
» Poll Booth
» Memberlist
» Member Map

Site Info
» Community Rules
» Moderator List

» Buy Quake

Visit QuakeOne.com On Facebook!Visit QuakeOne
on Facebook

Log in
User Name:

Password:

Not a member yet?
Register Now!
Online Users: 417
7 members and 410 guests
303, monoz, nahuel, Planetnine, turtlevan
Most users ever online was 2,542, 06-04-2016 at 12:58 AM.
Go Back Home > Forums > Quake Talk > Quake Central > How do I make impulse commands to work in QuakeC? Search Forums

Reply
LinkBack Thread Tools
Unread 03-14-2017, 05:41 AM   #1 (permalink)
Axe Man
USER INFO »
Posts: 16
+/-  Reputation: quake one is on a distinguished road
Join Date: Dec 2016
Currently: Offline
How do I make impulse commands to work in QuakeC?

I want to use QuakeC to compile and create a progs.dat that will allow me in game's console (that I can bring by pressing the tilde ` key):

impulse 12 => Equip the previous weapon or toggle weapons down
impulse 252 => have now Pentagram of Protection
impulse 253 => have now Ring of Shadows
impulse 254 => have now Bio-suit

I am using Dark Places engine, and currently these commands do nothing.

I wanted to ask this question in the InsideQC forum, but my account is currently inactive and I can't active it, because I don't know how to. It says that I need to contact an administrator for help with this, but it doesn't say how to do this, so I decided to ask it here.

Note: After I have registered in InsideQC, I didn't receive email with link to activate my account.

Last edited by quake one; 03-14-2017 at 05:48 AM..
Reply With Quote
Unread 03-14-2017, 10:16 AM   #2 (permalink)
Chthon
Dutch's Avatar
USER INFO »
Posts: 952
+/-  Reputation: Dutch has a spectacular aura aboutDutch has a spectacular aura about
Join Date: Jan 2014
Currently: Offline
Find the ImpulseCommands function...i think it's in weapons.qc. Look at how they tie in the various impulses. Now look at the QuadCheat command. You can replicate this command for the other power-ups. Look at CheckPowerUps command to see all the player fields regarding powerup behavior, so you'll know what to include in your new impulse commands.

Impulse12 is already done if you download progs 1.06 source. Or you could simply re-write impulse 10 in reverse order.

Use a good text editor like Notepad++ to edit the files. Use FTEQCC to compile the source into a new progs.dat.
Reply With Quote
Unread 03-14-2017, 10:29 AM   #3 (permalink)
Axe Man
USER INFO »
Posts: 16
+/-  Reputation: quake one is on a distinguished road
Join Date: Dec 2016
Currently: Offline
Originally Posted by Dutch View Post
Find the ImpulseCommands function...i think it's in weapons.qc. Look at how they tie in the various impulses. Now look at the QuadCheat command. You can replicate this command for the other power-ups. Look at CheckPowerUps command to see all the player fields regarding powerup behavior, so you'll know what to include in your new impulse commands.

Impulse12 is already done if you download progs 1.06 source. Or you could simply re-write impulse 10 in reverse order.

Use a good text editor like Notepad++ to edit the files. Use FTEQCC to compile the source into a new progs.dat.
Thanks.
Reply With Quote
Unread 03-14-2017, 04:50 PM   #4 (permalink)
Axe Man
USER INFO »
Posts: 16
+/-  Reputation: quake one is on a distinguished road
Join Date: Dec 2016
Currently: Offline
Originally Posted by Dutch View Post
Find the ImpulseCommands function...i think it's in weapons.qc. Look at how they tie in the various impulses. Now look at the QuadCheat command. You can replicate this command for the other power-ups. Look at CheckPowerUps command to see all the player fields regarding powerup behavior, so you'll know what to include in your new impulse commands.

Impulse12 is already done if you download progs 1.06 source. Or you could simply re-write impulse 10 in reverse order.

Use a good text editor like Notepad++ to edit the files. Use FTEQCC to compile the source into a new progs.dat.
Unknown command "CheckPowerUps".
Reply With Quote
Unread 03-15-2017, 06:01 AM   #5 (permalink)
Chthon
Dutch's Avatar
USER INFO »
Posts: 952
+/-  Reputation: Dutch has a spectacular aura aboutDutch has a spectacular aura about
Join Date: Jan 2014
Currently: Offline
Originally Posted by quake one View Post
Unknown command "CheckPowerUps".
I'm assuming you can't find it? I may need a bit more info to help you.

It's a function located in weapons.qc, near the bottom of the file above PlayerPreThink(). Within this function, the players fields regarding the power ups are constantly updated/monitored when it is called on in PlayerPostThink(). You need to look in this function, find the appropriate fields for each powerup, and write functions that initiate these fields and update the player's items (EXACTLY like the QuadCheat() function), and then tie these functions to impulses within ImpulseCommands. Then you'll need to bind a key on your keyboard to these commands in-game.

What I just detailed is very basic stuff...if it doesn't make any sense, you need to read through this:

QuakeC Manual

Everything you need to know is in there. The rest you will learn by trial and error.

Last edited by Dutch; 03-15-2017 at 08:39 AM..
Reply With Quote
Unread 03-15-2017, 08:44 AM   #6 (permalink)
Chthon
Dutch's Avatar
USER INFO »
Posts: 952
+/-  Reputation: Dutch has a spectacular aura aboutDutch has a spectacular aura about
Join Date: Jan 2014
Currently: Offline
@quake one

When I get home from work tonight, I'll post up an example of what I'm detailing. I realize I threw a lot of info at you, sometimes it's hard to remember how difficult the initial learning curve is for QC.
Reply With Quote
Unread 03-15-2017, 03:37 PM   #7 (permalink)
Axe Man
USER INFO »
Posts: 16
+/-  Reputation: quake one is on a distinguished road
Join Date: Dec 2016
Currently: Offline
Originally Posted by Dutch View Post
@quake one

When I get home from work tonight, I'll post up an example of what I'm detailing. I realize I threw a lot of info at you, sometimes it's hard to remember how difficult the initial learning curve is for QC.
I quickly found out how and discovered how to extend the time of the quad damage powerup in weapons.qc and I am doing B.Cs degree in computer science, so don't think that I am fool. For me, it shouldn't be so hard to learn QuakeC or QC in short. I can learn it quickly. It's just to learn new language and syntax. Not big problem for me. Really. I just need clear and detailed answer with good explanation. You have done this already, so I thank you. I will try your tips and let you know if I have achieved my goal.

Unknown command "CheckPowerUps".
At the beginning of this thread, when you first time ever mentioned this command, you didn't say where to look for it, so I guessed that this another one of the commands of the darkplaces quake engine, so I just launched and run the game, pressed the tilde ` key to bring up the console and typed "CheckPowerUps". The game console then said
Unknown command "CheckPowerUps"
Only later you said that this command should be in the weapons.qc text file, and implied that it doesn't in the darkplaces quake engine. I don't want to guess where everything is. You should specify. You should tell at least all the minimum and necessary information I need, so I will succeed to do what I want to do at last.

Now I have opened the weapons.qc text file with Notepad.exe, the known application that comes with the every Microsoft Windows operating system, and I have invoked the Find procedure of this application (through window's menu) for the string input "CheckPowerUps" and then a message box appeared with the output

Cannot find "CheckPowerUps"
But you said that this command should be in this text file, so I should not get this output from Notepad.exe. Same for both "PlayerPreThink" and "PlayerPostThink". Are you kidding me or what?

Last edited by quake one; 03-15-2017 at 03:59 PM..
Reply With Quote
Unread 03-15-2017, 07:42 PM   #8 (permalink)
Chthon
Dutch's Avatar
USER INFO »
Posts: 952
+/-  Reputation: Dutch has a spectacular aura aboutDutch has a spectacular aura about
Join Date: Jan 2014
Currently: Offline
Yeah, I screwed up. The impulse commands and the quad cheat are in weapons.QC. checkpowerups and PlayerPreThink are in client.QC. Apologies.

@giving you all information

I gave you more info than I had when I started QC, and I figured all that stuff out myself. And then I offered to provide an example, which you just turned down.

@couldn't find checkpowerup function

If you can't find a function in a particular file, open up all the files, and use the find feature in all open documents...which you can't do in the shitty notepad text editor. But you can do it in notepad++, the program I recommended you download to edit QC files.

So here's where we stand: you don't want to track down any of the necessary info yourself, and expect a free answer. Then when I offer you a free answer, you turn it down. I'm confused. I'm not trying to be a dick, but you're acting very demanding.
Reply With Quote
Unread 03-16-2017, 06:13 AM   #9 (permalink)
FTEQW Author
USER INFO »
Posts: 1,082
+/-  Reputation: Spike has a spectacular aura aboutSpike has a spectacular aura about
Join Date: Jul 2010
Currently: Offline
fteqccgui has a simple grep feature that can scan through all of your mod's qc files to find both where thing are defined or used. notepad++ likely has a similar feature but I don't know if it'll scan other files or not, I can't say I've ever used it.
For instance, grep for 'impulse' and you'll find the various places where the impulse handling stuff is (eg: the bit in weapons.qc where it handles impulse 255 and invokes QuadCheat). From there you can find super_damage_finished, and then find your way to powerup_touch so you can find the names of the equivelent fields for the other powerups. Easy.

The term 'command' usually refers to console commands, using that word to refer to a function is something that only someone who wrote too many shell scripts would do...
that said, quake's console commands are very rarely camelback like that, so anyone who's been around quake a while should realise that pretty quickly (recognising the individual functions makes it a bit too easy).
__________________
Some Game Thing
Reply With Quote
Unread 03-16-2017, 06:28 AM   #10 (permalink)
Chthon
Dutch's Avatar
USER INFO »
Posts: 952
+/-  Reputation: Dutch has a spectacular aura aboutDutch has a spectacular aura about
Join Date: Jan 2014
Currently: Offline
Originally Posted by Spike View Post
The term 'command' usually refers to console commands, using that word to refer to a function is something that only someone who wrote too many shell scripts would do...
that said, quake's console commands are very rarely camelback like that, so anyone who's been around quake a while should realise that pretty quickly (recognising the individual functions makes it a bit too easy).
Yeah, I didn't even realize I was doing this until after I posted...it's an old habit of mine, even before QC (back in the Matlab days in college).

I'll have to give your GUI compiler a try, sounds pretty handy.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 05:29 PM.


eXTReMe Tracker