time limit in game? (CSBwin)
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- ADDF_Toxic
- On Master
- Posts: 623
- Joined: Wed Apr 27, 2005 2:43 pm
- Location: Canada
- Contact:
time limit in game? (CSBwin)
I was wondering if there was any way that I could create a time limit in a dungeon? I want it to make the player stop playing after a predetermined time. Thanks.
I dont think it`s a good idea... Zoom is right, IMO: when you starve, the game ends. I think this is best idea. Some people have long playing style and hard set time-limit wouldnt be good for them.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
- ADDF_Toxic
- On Master
- Posts: 623
- Joined: Wed Apr 27, 2005 2:43 pm
- Location: Canada
- Contact:
The &wait was different - it was for an internal DSA delay between commands (So a chain of explosions wouldn't happen together, which they unfortunately always will do, and you have to cleverly work around)
By delay I mean the DSA can send a message with a much longer delay attached than a normal actuator - don't know the limit on the delay, but it's still enormous. Probably still not long enough to allow much game time, but you can make the DSA target itself, update a counter inside itself, and finally target an end game pad after a set count
So what you could do in the S0 of a DSA is
LA &1+ &dup SA L10 &= ?JC0 L$ M1000S*
In C0 of the DSA put
MSB
What happens is you target a set effect to the DSA from a floor pad the player has to walk over right at the start (or from champion mirrors) the dungeon starts.
You put 0 into the parameter A of the DSA. The DSA then looks at this parameter (initially 0) increments that number by 1, puts it back into parameter A, and the reason for the duplicate is then you still have that number to compare to a pre-determined number (10 in this case) If it is true, the DSA jumps to C0 which is the code line for targetting an end game pad at the potision indicated by parameter B. Otherwise the DSA carries on line S0 and targets itself (L$ loads to position of the DSA) with a set effect after a delay of 1000. Which will of course so the whole S0 line again.
So in this case after 10,000 clock ticks, the game will end. You can tweak that code for the maximum allowable message delay, then the maximum amount of playing time you want
By delay I mean the DSA can send a message with a much longer delay attached than a normal actuator - don't know the limit on the delay, but it's still enormous. Probably still not long enough to allow much game time, but you can make the DSA target itself, update a counter inside itself, and finally target an end game pad after a set count
So what you could do in the S0 of a DSA is
LA &1+ &dup SA L10 &= ?JC0 L$ M1000S*
In C0 of the DSA put
MSB
What happens is you target a set effect to the DSA from a floor pad the player has to walk over right at the start (or from champion mirrors) the dungeon starts.
You put 0 into the parameter A of the DSA. The DSA then looks at this parameter (initially 0) increments that number by 1, puts it back into parameter A, and the reason for the duplicate is then you still have that number to compare to a pre-determined number (10 in this case) If it is true, the DSA jumps to C0 which is the code line for targetting an end game pad at the potision indicated by parameter B. Otherwise the DSA carries on line S0 and targets itself (L$ loads to position of the DSA) with a set effect after a delay of 1000. Which will of course so the whole S0 line again.
So in this case after 10,000 clock ticks, the game will end. You can tweak that code for the maximum allowable message delay, then the maximum amount of playing time you want
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- ADDF_Toxic
- On Master
- Posts: 623
- Joined: Wed Apr 27, 2005 2:43 pm
- Location: Canada
- Contact:
Hehehe!Paul Stevens wrote:Delay maximum is about 24000000 = 4000000 seconds = 46 days
So it seems like each tick is six seconds.
I think I should tell you that this is two levels to walk in, which might make what to do change a little bit, as I need to make it in both levels.
Where do you get A out of this?beowuuf wrote:'M<pick your delay>S' with parameter A
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- ADDF_Toxic
- On Master
- Posts: 623
- Joined: Wed Apr 27, 2005 2:43 pm
- Location: Canada
- Contact:
Nope
The send message function code is:
M<delay><message type S, C or T><to location stored in A or B>
So 'M4CB' would, after a delay of 4, send a close message to the location stored in parameter B
'M4SA' would send a set message to the location stored in parameter A after 4 seconds. But as both 'set' and 'parameter A' are default settings, you could just not put them,so the code would be 'M4'
Note you can use '*' instead of a parameter - in this case, it takes the location information from the stack
So L0 MS* would send a set message to the top left corner or the dungeon. L$ Ms* (in my example) sends a set message to the DSA, as L$ loads the location of the DSA into the stack
The send message function code is:
M<delay><message type S, C or T><to location stored in A or B>
So 'M4CB' would, after a delay of 4, send a close message to the location stored in parameter B
'M4SA' would send a set message to the location stored in parameter A after 4 seconds. But as both 'set' and 'parameter A' are default settings, you could just not put them,so the code would be 'M4'
Note you can use '*' instead of a parameter - in this case, it takes the location information from the stack
So L0 MS* would send a set message to the top left corner or the dungeon. L$ Ms* (in my example) sends a set message to the DSA, as L$ loads the location of the DSA into the stack
I think limiting food is somewhat easier... You could even have a 'trading post' where you could hand in armour and weapons to buy more food/time. However overall, I am not a fan of limiting time unless it is a very small dungeon. I would hate to play 10 levels for weeks and then not be able to finish.
- ADDF_Toxic
- On Master
- Posts: 623
- Joined: Wed Apr 27, 2005 2:43 pm
- Location: Canada
- Contact:
Yes beowuuf, I said two levels...the first two levels of Dungeon Master(Hall of Champions and Welcome). I'm trying to make a DMDemo type thing(not demo as in tutorial, limited version of it.) It doesn't have the stairs to level three already, there is a message and an end-game instead. Now I'm trying to make a time limit on it too.
Neat idea, Paul about the trading post thing!
I have a few questions:
1. How would I make the DSA in both levels?
2. So the first parameter (L0 in beowuuf's example in "L0 MS*") is the location?
Neat idea, Paul about the trading post thing!
I have a few questions:
1. How would I make the DSA in both levels?
2. So the first parameter (L0 in beowuuf's example in "L0 MS*") is the location?
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Have you discovered the documentation at:So the first parameter is the location
http://www.dianneandpaul.net/CSBwin/doc ... Index.html
The 'Syntax' and 'Language' pages answer such questions for
many of the commonly used functions. It is pretty clear
for this particular case.....I just checked to be sure.
Do you understand the operation of the stack in this 'language'?
You seem to ask a lot of rather basic questions which leads me
to believe that either you don't study the available documentation
or you come up a bit short in your understanding of it. Maybe
we need an additional page with a couple dozen simple examples
that are described in detail. Would this help?
To make the DSA present in both levels, you have to make it present in both levels! Youj need to go to the level menu for each level, and go to 'eit dsa list' and add the DSA type you created in the 'global' menu.
For the end game DSA, you don't need to make it in both levels - make it in the first level, it triggers, and that is it...
For the end game DSA, you don't need to make it in both levels - make it in the first level, it triggers, and that is it...
Paul, if I am understanding your first question correctly, I do understand the language(You mean the DSA that is being discussed in this topic, right?)
To your second question...that would probably be a good idea, maybe if they also have dungeons with the examples too, then we can see what's happening.
Beo, I am trying this idea...It didn't work today, but this computer is getting annoying and I need a break, then I will try tomorrow. I do have an idea of what might be wrong, but I'm not totally sure. I will try tomorrow.
To your second question...that would probably be a good idea, maybe if they also have dungeons with the examples too, then we can see what's happening.
Beo, I am trying this idea...It didn't work today, but this computer is getting annoying and I need a break, then I will try tomorrow. I do have an idea of what might be wrong, but I'm not totally sure. I will try tomorrow.
- ADDF_Toxic
- On Master
- Posts: 623
- Joined: Wed Apr 27, 2005 2:43 pm
- Location: Canada
- Contact:
Ok, http://www.dmjump.net/dungeon.dat
Simplest form, just walk forward and after ~ five seconds (30 ticks) the game ends - because there are no champions it simply blanks the screen, with champions you would get the stat screen and the proper 'end' bit
Simplest form, just walk forward and after ~ five seconds (30 ticks) the game ends - because there are no champions it simply blanks the screen, with champions you would get the stat screen and the proper 'end' bit
- ADDF_Toxic
- On Master
- Posts: 623
- Joined: Wed Apr 27, 2005 2:43 pm
- Location: Canada
- Contact:
- ADDF_Toxic
- On Master
- Posts: 623
- Joined: Wed Apr 27, 2005 2:43 pm
- Location: Canada
- Contact:
I believe the best way to explain things like a dsa or csbuild "dungeon building" would be a short video tutorial
similar to the recording/playback feature of csbwin/linux maybe
(video tutorials containing a cursor and someone that comments on the cursor! Has to have a title like: enter dsa, basic csbuild,placing doors or what you can do with doors.) and should not be too large.)
to see things done and get explained where to click/ what happens.Together with the documentation and the help of the forum members, if done by someone who knows it well enough, would be great..
similar to the recording/playback feature of csbwin/linux maybe
(video tutorials containing a cursor and someone that comments on the cursor! Has to have a title like: enter dsa, basic csbuild,placing doors or what you can do with doors.) and should not be too large.)
to see things done and get explained where to click/ what happens.Together with the documentation and the help of the forum members, if done by someone who knows it well enough, would be great..
- ADDF_Toxic
- On Master
- Posts: 623
- Joined: Wed Apr 27, 2005 2:43 pm
- Location: Canada
- Contact:
I'ts the time limit that doesn't work in level one but in level 2. I waited for the time that I set in level 1 and it didn't work, then I tried in level 2 and it did work. Level one is the HOC.
I put a DSA actutator(or whatever it's called) at the bottom of level one. It triggers the end game on level 2 (maybe it needs the end game on level 1) with Parameter A. It is triggered by a floor pad as you walk down the hallway to the HOC triggered by anything.
The DSA actuator on level 2 is triggered by an apple on a pressure plate. The pressure plate is triggered by anything. The acuator is at the bottom of the level again. It triggers the end game on the left side of level 2 with parameter A(like your demo did).
Hopefully this is enough information for you, beowuuf.
No I will not be recording from the start of the game to when it ends the game, because my time limit is 30 minutes, which would not be short. It would be 1 hour if I recorded both and showed it to you.
Also, is this DSA topic the "M[delay]<message type>[<target>]" on PaulS's documentation( http://www.dianneandpaul.net/CSBwin/doc ... guage.html )?
I put a DSA actutator(or whatever it's called) at the bottom of level one. It triggers the end game on level 2 (maybe it needs the end game on level 1) with Parameter A. It is triggered by a floor pad as you walk down the hallway to the HOC triggered by anything.
The DSA actuator on level 2 is triggered by an apple on a pressure plate. The pressure plate is triggered by anything. The acuator is at the bottom of the level again. It triggers the end game on the left side of level 2 with parameter A(like your demo did).
Hopefully this is enough information for you, beowuuf.
No I will not be recording from the start of the game to when it ends the game, because my time limit is 30 minutes, which would not be short. It would be 1 hour if I recorded both and showed it to you.
Also, is this DSA topic the "M[delay]<message type>[<target>]" on PaulS's documentation( http://www.dianneandpaul.net/CSBwin/doc ... guage.html )?