View previous topic :: View next topic |
Author |
Message |
MDave

Joined: 17 Dec 2007 Posts: 75
|
Posted: Mon Dec 17, 2007 9:51 pm Post subject: 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  |
|
Back to top |
|
 |
Sajt
Joined: 16 Oct 2004 Posts: 1026
|
Posted: Mon Dec 17, 2007 10:47 pm Post subject: |
|
|
/me shrugs
Do you have a \n after your command in the call to stuffcmd? _________________ F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe. |
|
Back to top |
|
 |
MDave

Joined: 17 Dec 2007 Posts: 75
|
Posted: Mon Dec 17, 2007 11:38 pm Post subject: |
|
|
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 ... |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2004 phpBB Group
|