Chaosforge Forum

  • March 28, 2024, 13:48
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: Variants of special levels design - have a suggestions?  (Read 3151 times)

Equality

  • Second Lieutenant
  • *
  • Offline Offline
  • Posts: 174
  • Lost Soul
    • View Profile

Last time examine one thing as a chain of special levels. I want get the next:

Code: [Select]
lev1
 |
lev2 - special - special - special ...
 |
lev3
...
all my attempts use a level.OnExit fails. OnExit - when player leave current level. No "OnExitCheck" hook here.
Well, as a result, I create global variable for deep-meter, and use the same special level. Like next:

Code: [Select]
at episode creation:
player.episode[1].special = "test1"

at level creation:
...
 Create = function ()
level.name="test A"..i_1
level.danger_level=level.danger_level+1

generator:reset()
... (generate level as I want)
if i_1==iLast then
generator:generate_stairs()  --if last in chain, only standart exit to continue main quest
else
generator:generate_special_stairs()  --else only special which lead to this level again and again
end
...
  end,

 OnExit = function()
...
i_1=i_1+1
 end,

}
another variant is using something like portal at Phobos Anomaly, but I do not want that (no save possibility). So, I can do a chain of some perpendicular special levels... Unfortunately all have common kills count and the same history string. And result at history:
He came at test level.
He came at test level.
He came at test level.
...

so,
1. How I can change level "entry" history string? Not once, but dinamically?
2. Another way of do something like that with any chain lenght and save possibility?
« Last Edit: May 13, 2013, 07:12 by Equality »
Logged
Once advanced DoomRL player
Find mysterious sword Dragonslayer
Say "Best thing ever found!" and start jumping around...
But he can't get the sword from the ground

Equality

  • Second Lieutenant
  • *
  • Offline Offline
  • Posts: 174
  • Lost Soul
    • View Profile
Re: Variants of special levels design - have a suggestions?
« Reply #1 on: May 13, 2013, 10:27 »

or may be exists some functions for

- delete last history string (for not spam history in such way)
or
- hook descending before leaving the level (and get a possibility for not only that trick, but also set a special condition for descending. Can't descend if not kill all. Can't descend if not pickup some item. Can't descend if have some 'restricted' items in inventory and so on) (but saving will blocked - so chain of levels must not be a longer than 2-3, may be I should use a 'portal' for that)
?

well, possibility of save in a middle is not strong condition... if chain length only 3 'levels'
Logged
Once advanced DoomRL player
Find mysterious sword Dragonslayer
Say "Best thing ever found!" and start jumping around...
But he can't get the sword from the ground
Pages: [1]