Triggers and localcmd / stuffcmd strangness
Moderator: InsideQC Admins
3 posts
• Page 1 of 1
Triggers and localcmd / stuffcmd strangness
Hi all, I've been a lurker for the last few months (or 6) and have had many a good read here for help and the discussions that go on. Really helpful tutorial section too! It helped me with my weapon reloading code which is all nice and small (read: the shotgun jamming tutorial)
I also managed to code a bow and arrow weapon from scratch from what I've learned here
Credits to all those that made the tutorials.
I've finally registered and posted here because of one thing I can't seem to get around to fixing or doing right, and that is using triggers to send a command to the console to do things like walking from one area to another and the fog changes accordingly (color, intensity etc)
Now, I've managed to get it so when you enter a trigger_multiple, it triggers a trigger I made called trigger_command with the command to change the fog. Where the problem lies is, the controls sometimes lockup or act like a key is constantly pressed until it fixes itself. Somehow, increasing the "wait until reset" time on the trigger multiple lessens that effect, but it be prefereed if I could eliminate the problem altogether. Even if I have to edit the engine.
This strange behaviour is similar to when you hold down fire, and while holding down fire go into the menu, let go of the fire key then escape key back into the game, the weapon keeps firing. (not sure if that is fixed with the new engines out there, but they don't fix my problem)
Any help would be greatly appreciated
When I'm all done I'll contribute back to the community
I also managed to code a bow and arrow weapon from scratch from what I've learned here
I've finally registered and posted here because of one thing I can't seem to get around to fixing or doing right, and that is using triggers to send a command to the console to do things like walking from one area to another and the fog changes accordingly (color, intensity etc)
Now, I've managed to get it so when you enter a trigger_multiple, it triggers a trigger I made called trigger_command with the command to change the fog. Where the problem lies is, the controls sometimes lockup or act like a key is constantly pressed until it fixes itself. Somehow, increasing the "wait until reset" time on the trigger multiple lessens that effect, but it be prefereed if I could eliminate the problem altogether. Even if I have to edit the engine.
This strange behaviour is similar to when you hold down fire, and while holding down fire go into the menu, let go of the fire key then escape key back into the game, the weapon keeps firing. (not sure if that is fixed with the new engines out there, but they don't fix my problem)
Any help would be greatly appreciated
When I'm all done I'll contribute back to the community
-

MDave - Posts: 76
- Joined: Mon Dec 17, 2007 7:08 pm
Thanks! That fixed it
Can't believe something so simple was making me pull my hair out. I'm not a coder by nature though, more of an artist
But its heck of a lot of fun learning.
Next on my list is going to figure out how to do a nice smooth fog transistional effect from one place to another instead of acting like an on/off switch. Guess I'll have to dive into the engine code for that one!
Some kind of loop that adds/decreases by 1 until it reaches the set value, but how to store the old value and the new one to compare them both is beyond me ...
Next on my list is going to figure out how to do a nice smooth fog transistional effect from one place to another instead of acting like an on/off switch. Guess I'll have to dive into the engine code for that one!
Some kind of loop that adds/decreases by 1 until it reaches the set value, but how to store the old value and the new one to compare them both is beyond me ...
-

MDave - Posts: 76
- Joined: Mon Dec 17, 2007 7:08 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest