Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18

Thread: Got an idea about time bomb spell, also having perhaps an issue

  
  1. #1
    Spider UnknownMaster21's Avatar
    Join Date
    Jul 2010
    Location
    Finland
    Posts
    201

    Default Got an idea about time bomb spell, also having perhaps an issue

    Hello, Once again I have got a ridiculous idea... and also issue ( perhaps, no idea )


    Here is the idea first:

    I want to use the time bomb spell, but with different meanings and I want to involve to it on my campaign.

    Here is the deal: Find a time bomb spell to defuse the bonus level time to not to lose the game ( the realm in my map is find a key to defuse the time of defeat and to claim all the land, the claiming the land works, though it is only for an action point to reach it, but the first one is hard to make it)

    I did not find it in any command, should I use it with timers? but I also want to a timer in right-up corner, it does not show up, should it even show? no idea, maybe I did something wrong, but anyway.

    Just a simple code: get the time bomb spell to the library - bonus level time stops/declines/ but does not win the game or lose. Question is, how to make it? ( I use destroy_walls spell, but that will not work the way I want it to)

    It uses IF_CONTROLS system: to get an action point and get the spell. ( I like this kind of script, somehow I love it have kind of an "options" to make your game, I like this style)


    Now, the issue:

    I am not sure if it even is an issue, but the time_bomb spell is researched immediately, when getting any creature to research. I haven't involved anyhow to research it, and it does not happen in any other map. All what I did is talking about time bomb set up in your dungeon in quick objective, and it is always researched.

    How to block this? Bug? Issue? or once again a user problem?

    ( I use r1422 )

    Thanks in advance


    EDIT: I did read/heard somewhere you could change the order of research about which come first and which come last, but I do not find in anywhere anymore. I also got an additional question, but I do not remember it anymore. I will ask when I remember it once again

    EDIT2: Found it: RESEARCH_ORDER
    When this command is first called, the research list for
    specified players is cleared. Using it you may create
    a research list from beginning. Note that if you won't place
    an item on the list, it will not be possible to research it.
    So if you're using this command, you must add all items
    available on the level to the research list. Example:
    RESEARCH_ORDER(ALL_PLAYERS,ROOM,SCAVENGER,50000)
    [...] - more RESEARCH_ORDER commands should follow.

    But I do not understand how this works, does this work when for example, putting all stuff here in alphabetical order, and minions will then research them in alphabetical order?
    Last edited by UnknownMaster21; October 24th, 2014 at 21:54. Reason: typo

  2. #2

    Default Re: Got an idea about time bomb spell, also having perhaps an issue

    Many questions, let's see if I'm understanding you correctly,....

    To set a timer, simply follow the instructions of the KeeperFX commands:
    Code:
    BONUS_LEVEL_TIME
    
    Sets time to be displayed on "bonus timer" - on-screen time field, used mostly for bonus levels.
    Like in original DK, this command accepts one parameter - number of game turns to start the countdown from. But now this command can be used to show bonus timer in any level.
    Setting game turns to 0 will hide the timer. Example:
    
    BONUS_LEVEL_TIME(12000)
    When time runs out, you won't win/lose the level. If you want that, you'd have to script it. If you want any stuff to happen when a timer runs out, script it. Take a look at the bonus levels included in the game for inspiration.
    As only KeeperFX supports the timer in non-bonus levels, you'll need the level_version(1) command.

    That creatures start to research time_bomb first could have two causes: Either you have nothing to research that comes before it in the default research order, or you have modified the research order.
    And yes, when you change the research order, you have to list all things to research. If you want alphabetical, list everything alphabetical. If you want time_bomb first, list that first, and then all other things to research.

    Has this answered all your questions?

    Quote Originally Posted by UnknownMaster21 View Post
    It uses IF_CONTROLS system: to get an action point and get the spell. ( I like this kind of script, somehow I love it have kind of an "options" to make your game, I like this style)
    Please note there is a difference between 'IF' and 'IF_CONTROLS'. IF is used for normal comparisons, eg "IF keeper 2 = destroyed, win game". There are a few special IF commands: IF_ACTION_POINT, IF_AVAILABLE, IF_CONTROLS that do stuff you cannot do with the regular IF command, but do only that. Use the first one if you want to see if an action point has been triggered, use the last one if you want to know how many creatures a player has that are NOT in prison.
    Last edited by YourMaster; October 25th, 2014 at 01:00.

  3. #3
    Spider UnknownMaster21's Avatar
    Join Date
    Jul 2010
    Location
    Finland
    Posts
    201

    Default Re: Got an idea about time bomb spell, also having perhaps an issue

    Code:
    IF_ACTION_POINT(5,PLAYER0)
    QUICK_OBJECTIVE(20,"Praise",PLAYER0)
    WIN_GAME
    ENDIF
    
    IF(PLAYER0,GAME_TURN >= 80000)
    QUICK_OBJECTIVE(21,"Time is up. You failed to get on here in time, so you have been defeated!",5)
    LOSE_GAME
    ENDIF
    
    BONUS_LEVEL_TIME(80000)
    I have done in this way, but is it possible to defuse/decline/stop the bonus level time, when an exact spell book ( Time Bomb ) is taken to a library? If yes, how? Or do I need to use TIMERS instead of?

    Quote Originally Posted by YourMaster View Post


    Please note there is a difference between 'IF' and 'IF_CONTROLS'. IF is used for normal comparisons, eg "IF keeper 2 = destroyed, win game". There are a few special IF commands: IF_ACTION_POINT, IF_AVAILABLE, IF_CONTROLS that do stuff you cannot do with the regular IF command, but do only that. Use the first one if you want to see if an action point has been triggered, use the last one if you want to know how many creatures a player has that are NOT in prison.
    Yes, I handle this already now, understood clearly!

  4. #4

    Default Re: Got an idea about time bomb spell, also having perhaps an issue

    I would do it like this:

    Code:
    REM Time to get POWER_HOLD_AUDIENCE
    SET_TIMER(PLAYER0,TIMER0)
    BONUS_LEVEL_TIME(80000)
    
    REM Stop timer when player has spell in library
    IF_AVAILABLE(PLAYER0,POWER_HOLD_AUDIENCE = 1)
    	SET_FLAG(PLAYER0,FLAG1,1)
    	BONUS_LEVEL_TIME(0)
    ENDIF
    	
    IF(PLAYER0,FLAG1 == 1)
    	QUICK_OBJECTIVE(20,"Praise",PLAYER0)
    	WIN_GAME
    ENDIF
    
    REM When time is up without POWER_HOLD_AUDIENCE available, lose game.
    IF(PLAYER0,FLAG1 == 0)
    	IF(PLAYER0,TIMER0 >= 80000)
    		QUICK_OBJECTIVE(21,"Time is up. You failed to get on here in time, so you have been defeated!",5)
    		LOSE_GAME
    	ENDIF
    ENDIF
    Using GAME_TURN would work just as well in the scenario above, but the timer has an advantage: You can reset both the timer and the counter, but gameturn is fixed. So if you want to take away or add time at some point, you'd need the timer, otherwise feel free to use game_turn.

  5. #5
    Spider UnknownMaster21's Avatar
    Join Date
    Jul 2010
    Location
    Finland
    Posts
    201

    Default Re: Got an idea about time bomb spell, also having perhaps an issue

    Thanks man! You are saving my day!


    But how about the Time Bomb spell book? It isn't used, but can it be used? Seems no, because you did not use it... anyway.

    EDIT: the win game will not be allowed due the fact you have to get to the action point. Can you combine the option? The timer and the action point? I have heard some things won't work each other due the fact the KeeperFX is not rewritten enough yet to be worked out
    Last edited by UnknownMaster21; October 25th, 2014 at 18:58.

  6. #6

    Default Re: Got an idea about time bomb spell, also having perhaps an issue

    I don't know how the game will react to the Time_Bomb spell, my guess is that the keeperfx script won't recognize it as a variable, so you can't reference it directly. You can try of course,...
    If not, and you want to use this spell, you can use the action point instead.

    You can make something happen if both an action point is triggered and a timer has run out, yes. I don't know what you mean by "The win game will not be allowed".

  7. #7
    Spider UnknownMaster21's Avatar
    Join Date
    Jul 2010
    Location
    Finland
    Posts
    201

    Default Re: Got an idea about time bomb spell, also having perhaps an issue

    Quote Originally Posted by YourMaster View Post
    I don't know how the game will react to the Time_Bomb spell, my guess is that the keeperfx script won't recognize it as a variable, so you can't reference it directly. You can try of course,...
    If not, and you want to use this spell, you can use the action point instead.

    You can make something happen if both an action point is triggered and a timer has run out, yes. I don't know what you mean by "The win game will not be allowed".

    haha, misunderstood by myself, I tried to mean that it is not the way to win the game to take the spell to library, it just defuse the time

    The real goal is to get an action point, but you get more time, actually infinite to make it to the action point when spell book is taken to the library

  8. #8
    Spider UnknownMaster21's Avatar
    Join Date
    Jul 2010
    Location
    Finland
    Posts
    201

    Default Re: Got an idea about time bomb spell, also having perhaps an issue

    Well, I think I stand on my very original thing on my script, but all what I need to ask is:

    Is it possible to actually LOSE a game AFTER you have WON it? I try it out!

  9. #9

    Default Re: Got an idea about time bomb spell, also having perhaps an issue

    I don't think it is possible to lose after you win,... but why would you want to? The player can press space as soon as the level is won, and at that point the game is over.

    Is this what you want:
    Code:
    REM Time to get POWER_HOLD_AUDIENCE
    SET_TIMER(PLAYER0,TIMER0)
    BONUS_LEVEL_TIME(80000)
    
    REM Stop timer when player has spell in library
    IF_AVAILABLE(PLAYER0,POWER_HOLD_AUDIENCE = 1)
    	SET_FLAG(PLAYER0,FLAG1,1)
    	BONUS_LEVEL_TIME(0)
    	QUICK_OBJECTIVE(20,"No more time limit",PLAYER0)
    ENDIF
    	
    REM When time is up without POWER_HOLD_AUDIENCE available, lose game.
    IF(PLAYER0,FLAG1 == 0)
    	IF(PLAYER0,TIMER0 >= 80000)
    		QUICK_OBJECTIVE(21,"Time is up. You failed to get on here in time, so you have been defeated!",5)
    		LOSE_GAME
    	ENDIF
    ENDIF
    
    REM When ACTION_POINT 5 is reached, win game and stop timer.
    IF_ACTION_POINT(5,PLAYER0)
    	BONUS_LEVEL_TIME(0)
    	WIN_GAME
    	QUICK_OBJECTIVE(21,"Praise",PLAYER0)
    ENDIF

  10. #10
    Spider UnknownMaster21's Avatar
    Join Date
    Jul 2010
    Location
    Finland
    Posts
    201

    Default Re: Got an idea about time bomb spell, also having perhaps an issue

    Quote Originally Posted by YourMaster View Post
    I don't think it is possible to lose after you win,... but why would you want to? The player can press space as soon as the level is won, and at that point the game is over.

    Is this what you want:
    Code:
    REM Time to get POWER_HOLD_AUDIENCE
    SET_TIMER(PLAYER0,TIMER0)
    BONUS_LEVEL_TIME(80000)
    
    REM Stop timer when player has spell in library
    IF_AVAILABLE(PLAYER0,POWER_HOLD_AUDIENCE = 1)
    	SET_FLAG(PLAYER0,FLAG1,1)
    	BONUS_LEVEL_TIME(0)
    	QUICK_OBJECTIVE(20,"No more time limit",PLAYER0)
    ENDIF
    	
    REM When time is up without POWER_HOLD_AUDIENCE available, lose game.
    IF(PLAYER0,FLAG1 == 0)
    	IF(PLAYER0,TIMER0 >= 80000)
    		QUICK_OBJECTIVE(21,"Time is up. You failed to get on here in time, so you have been defeated!",5)
    		LOSE_GAME
    	ENDIF
    ENDIF
    
    REM When ACTION_POINT 5 is reached, win game and stop timer.
    IF_ACTION_POINT(5,PLAYER0)
    	BONUS_LEVEL_TIME(0)
    	WIN_GAME
    	QUICK_OBJECTIVE(21,"Praise",PLAYER0)
    ENDIF

    Bingo! Too bad I actually changed my mind and I did something similar, but I think yours is even better, going to copy/paste it! Thanks man! Now the only issue is the time bomb itself as what I have told in issue tracker

Similar Threads

  1. Top 30 Games of All-Time
    By MeinCookie in forum Off Topic
    Replies: 59
    Last Post: February 11th, 2021, 13:58
  2. When was the last time you played DK or DK2?
    By Patrician in forum General Discussion
    Replies: 15
    Last Post: July 5th, 2013, 10:28
  3. Time Bomb spell.
    By friscmanseby in forum KeeperFX
    Replies: 2
    Last Post: September 19th, 2012, 05:38

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •