Is it possible within quakec to call the screen colour effect thing when you pick up the invulnerability item - without picking up the invulnerability item or being invulnerable.
Yes, I have structured that question so I could write invulnerability as much as possible
invulnerability
-
- InsideQC Staff
- Posts: 1120
- Joined: Sat Oct 16, 2004 3:34 pm
Re: invulnerability
Well, your best bet would be to use v_cshift. You'll have to either stuffcmd or localcmd it though.ajay wrote:Is it possible within quakec to call the screen colour effect thing when you pick up the invulnerability item - without picking up the invulnerability item or being invulnerable.
Yes, I have structured that question so I could write invulnerability as much as possible
Syntax:
v_cshift red green blue intensity
red green and blue indicate the amounts of each color used to create your screen color. Use varying amounts of each to "blend" the color you want. Intensity determines how strong the effect is.
For QC usage example:
per player:
stuffcmd(self, "v_cshift 0 0 0 0\n");
The above will reset your screen color effect to normal.
Shadow is correct, but after reviewing your wording a second time, I have concluded that this solution could also be considered technically viable (what a weasel I am):
self.items = self.items | IT_INVULNERABILITY;
This should set your screen color, as well as set the invulnerability icon on the console (that hex symbol). You shouldn't be invulnerable, however (the code actually checks self.invulnerable_time or invulnerable_finished), but your screen color will be changed. The only problem is that the hex symbol that indicates you have the invulnerability powerup will still be visible, and you may not want that.
The good Dr. Shadowborg's method is probably the most useful for you. You can also put this in PutClientInServer to make sure that the screen doesn't stay red by accident when the player respawns or changes maps, etc:
stuffcmd(self, "v_cshift 0 0 0 0\n"); // reset view color
Good luck, ajay!
self.items = self.items | IT_INVULNERABILITY;
This should set your screen color, as well as set the invulnerability icon on the console (that hex symbol). You shouldn't be invulnerable, however (the code actually checks self.invulnerable_time or invulnerable_finished), but your screen color will be changed. The only problem is that the hex symbol that indicates you have the invulnerability powerup will still be visible, and you may not want that.
The good Dr. Shadowborg's method is probably the most useful for you. You can also put this in PutClientInServer to make sure that the screen doesn't stay red by accident when the player respawns or changes maps, etc:
stuffcmd(self, "v_cshift 0 0 0 0\n"); // reset view color
Good luck, ajay!
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
-
- InsideQC Staff
- Posts: 1120
- Joined: Sat Oct 16, 2004 3:34 pm
It should also be noted that not only does the hex symbol appear, it also sets your armorvalue to 666, armor icon to the pentagram, generates a "glow" somewhat akin to EF_DIMLIGHT, and changes your "face" shot to the "Infused with evile" pic.Wazat wrote:This should set your screen color, as well as set the invulnerability icon on the console (that hex symbol). You shouldn't be invulnerable, however (the code actually checks self.invulnerable_time or invulnerable_finished), but your screen color will be changed. The only problem is that the hex symbol that indicates you have the invulnerability powerup will still be visible, and you may not want that.