Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Not sure if important
Not sure if important
2002-11-08, 3:14 PM #1
but it's cog related.

You know when you have weapon cog, with a 1 second sleep in the middle and you don't hold the key down long enough, it stops the fire message.
What I'm talking about is if you use the call fuction to call a user defined message with a sleep in the fire message, you WILL have all sorts of problems. I don't know why or how it does this, but I wish I knew this before I started modifying my FD-31c burst fire section.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-11-08, 3:32 PM #2
Couldnt in the fire message you start another module which fired the second 2 shots. Or doesnt that work?
Team Battle.
2002-11-08, 4:43 PM #3
I'm talking about when the fire delay is greater then the total sleep time.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-11-08, 5:02 PM #4
Part of the evilness of Sleep. Try using Timers.
- Wisdom is 99% experience, 1% knowledge. -
2002-11-08, 11:18 PM #5
I' ve had similar problems. I also tried to implement a burst fire mode with 0.1 seconds between each shot, but I failed. The two things I tried were having a new message called in the fire message (was very buggy) and having an integer that stores the number of shots fired (firing was done in the fire message), then firing the rest of the shots in the deactivated message. But that didn't work as expected, too. It shouldn't be that hard, but I no longer need burst firemode anyway.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-11-09, 6:18 AM #6
I did use timers. What I did was put the burst(s) in a 0 second timer and have it be done there. Works perfectly. [http://forums.massassi.net/html/wink.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-11-11, 2:05 AM #7
Wait, a zero second timer? did you have timers with a sleep message at the beginning? Doesn't that kind of defeat the purpose of a timer in the first place?
2002-11-11, 4:17 AM #8
*whacks head in hole in wall that has been carved out by whacking head there*

Using the timers to escape the fire message, but still use it. In the cog with the timers, there is no sleep() in the fire message. That is really the only bug free way (except making it a semi-auto or single shot instead of auto) to do this.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-11-15, 11:14 PM #9
Quite clever, I must say.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-11-17, 2:59 PM #10
Thank you. But its nothing really. Unlike my friendly AI cogs. Now those toke something more. [http://forums.massassi.net/html/wink.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.

[This message has been edited by Descent_pilot (edited November 17, 2002).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-11-19, 5:34 PM #11
I think because Sleep(); delays EVERYTHING in the cog, including other delays.
I am _ Ace_1 _ , and I approve this message.
2002-11-19, 6:00 PM #12
Not true. Sleep only pauses the current message. Other messages can be called in the cog and run during the sleep.


Timers > Sleeps.
And when the moment is right, I'm gonna fly a kite.
2002-11-20, 10:52 AM #13
Actually I think I've encountered instances when sleep affects other messages. I'm not certain its as simple as Sleep delay in activated only halts activated.

Maybe I'll find time to test this later.

Quote:
<font face="Verdana, Arial" size="2">Originally posted by GBK:
Not true. Sleep only pauses the current message. Other messages can be called in the cog and run during the sleep.
Timers > Sleeps.
</font>

- Wisdom is 99% experience, 1% knowledge. -
2002-11-20, 4:15 PM #14
I can't believe I'm saying this... :P GBK is correct, sleep only affects the current message.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-11-20, 4:25 PM #15
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Descent_pilot:
I can't believe I'm saying this... :P GBK is correct...
</font>


Get used to it.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

GBK oNline. Cogs, tuts, and total w00tage.
And when the moment is right, I'm gonna fly a kite.
2002-11-21, 10:44 AM #16
GBK is right. When I use sleep(); in some cogs I'll sometimes block subsequent messages from being processed until the first one is finished.

------------------
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
2002-11-21, 1:34 PM #17
I prefer to stay away from sleeps for the most part because I've heard bad/mixed things about them. But I'll often use them in a prototype cog when I'm just trying to get something to work because they are so quick to implement.
2002-11-21, 2:19 PM #18
Use sleep()s in a cutscene cog, or maybe something else, but the only thing I can think of that sleep is the only/best/cleanist way to go in a cog is cutscenes cogs.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack

↑ Up to the top!