Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 25

Thread: Heroes destroys own doors if locked due the reason of what?

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

    Default Heroes destroys own doors if locked due the reason of what?

    EDIT: SOLVEDAs I am continuing to make more maps for my oncoming campaign, I want to know what causes the heroes to destroy own doors if locked?

    All doors are owned by heroes ( PLAYER4 / PLAYER_GOOD)

    All Creatures are PLAYER4/PLAYER_GOOD


    EDIT: SOLVED Also, I have noticed this doesn't work:

    Code:
    IF(PLAYER1,TOTAL_ROOMS <= 0)
    	IF_CONTROLS(PLAYER_GOOD,TOTAL_CREATURES <= 0)
    		QUICK_OBJECTIVE(5,"Praise",PLAYER1)
    		WIN_GAME
    	ENDIF
    ENDIF
    Should it there be a flagged for this?


    Immediately I start a level, the Quick_Obj 5 is shown up before anything happened. /SOLVED



    Now the bonus section:

    Can there be two separate heroes fighting each other, thinking of if they can destroy their own doors? I am doing maps with Adikted


    EDIT: SOLVED EDIT: More info here:

    Script(line 1): script_scan_line: Level files version 1.
    Error: script_scan_line(line 95): Invalid command, 'IF_CONTROLS' (lev ver 1)
    Sync: Created menu ID 1 at slot 0, pos (0,0) size (140,400)
    Sync: Created menu ID 2 at slot 1, pos (0,0) size (140,400)
    Error: command_if(line 94): Unknown variable name, 'TOTAL_ROOMS'
    Error: script_scan_line(line 95): Invalid command, 'IF_CONTROLS' (lev ver 1)
    Error: command_win_game(line 97): Command WIN GAME found with no condition
    Error: pop_condition(line 98): unexpected ENDIF
    Error: pop_condition(line 99): unexpected ENDIF
    Warning: No WIN GAME conditions in script file.

    It says IF_CONTROLS is invalid? how come? There must be something wrong again I guess, post a reply, if need more for having an explanation, as I have no clue enough yet to make this solvable /SOLVED
    Last edited by UnknownMaster21; October 18th, 2014 at 22:11.

  2. #2
    KeeperFX Author mefistotelis's Avatar
    Join Date
    Sep 2009
    Location
    Poland
    Posts
    1,242

    Default Re: Heroes destroys own doors if locked due the reason of what?

    Quote Originally Posted by UnknownMaster21 View Post
    It says IF_CONTROLS is invalid? how come?
    This command has been added to KeeperFX quite recently; are you using the latest nightly?

    And for TOTAL_ROOMS - there's no such variable. Variables (for original DK) are listed here:
    http://keeper.lubiki.pl/dk1_docs/dk_...crpt_variables

    Well, I think such variable could be added - TOTAL_ROOMS does sound natural after looking at other variables. Maybe TOTAL_TRAPS too.

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

    Default Re: Heroes destroys own doors if locked due the reason of what?

    Quote Originally Posted by mefistotelis View Post
    This command has been added to KeeperFX quite recently; are you using the latest nightly?

    And for TOTAL_ROOMS - there's no such variable. Variables (for original DK) are listed here:
    http://keeper.lubiki.pl/dk1_docs/dk_...crpt_variables

    Well, I think such variable could be added - TOTAL_ROOMS does sound natural after looking at other variables. Maybe TOTAL_TRAPS too.

    I am using 0.4.5 version and there it works on earlier one what we talked in here: http://keeperklan.com/threads/4824-M...ll=1#post48436

    EDIT: I changed simplier way TOTAL_ROOMS to DUNGEON_DESTROYED == 1 and it works now on it.

    Still, if possible, can anyone reproduce about on-topic?
    Last edited by UnknownMaster21; October 12th, 2014 at 22:01.

  4. #4

    Default Re: Heroes destroys own doors if locked due the reason of what?

    So all the scripting issues fixed? good.

    This could have been done if through the script we could lock/unlock doors, or change the owner of a slab. Both these script commands have proposed as possible new script commands, but not implemented(yet?).
    So there is no easy way to do this.

    What you could do, is spawn a tunneler with the command to dig towards your dungeon. He will not break the door, but will dig through his own walls. There is a bug though that if he hits a door straight on he gets stuck and stops tunneling. However, if you place him right (so from the side) he could dig towards the walls beside the door and as such break it.

    Another possibility, is to make the doors not belong to the heroes, and spawn them only when you want the doors destroyed. If you want to have heroes in the room before, you can make sure they belong to the same player as the door, and kill them with the kill creature command, and replace them with heroes of another player.

    The solution that probably fits your map best, is to not lock the door at all, and spawn the party early on with the task of going to your dungeon, but set a very big delay on this: You can say "attack the players in 20 minutes". They stick around where they spawn until the delay is up, and then simply walk through the unlocked door.

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

    Default Re: Heroes destroys own doors if locked due the reason of what?

    Quote Originally Posted by YourMaster View Post
    So all the scripting issues fixed? good.

    This could have been done if through the script we could lock/unlock doors, or change the owner of a slab. Both these script commands have proposed as possible new script commands, but not implemented(yet?).
    So there is no easy way to do this.

    What you could do, is spawn a tunneler with the command to dig towards your dungeon. He will not break the door, but will dig through his own walls. There is a bug though that if he hits a door straight on he gets stuck and stops tunneling. However, if you place him right (so from the side) he could dig towards the walls beside the door and as such break it.

    Another possibility, is to make the doors not belong to the heroes, and spawn them only when you want the doors destroyed. If you want to have heroes in the room before, you can make sure they belong to the same player as the door, and kill them with the kill creature command, and replace them with heroes of another player.

    The solution that probably fits your map best, is to not lock the door at all, and spawn the party early on with the task of going to your dungeon, but set a very big delay on this: You can say "attack the players in 20 minutes". They stick around where they spawn until the delay is up, and then simply walk through the unlocked door.

    Good one!


    But, there isn't parties, well wait when I get a possess spell script working right, I will upload it on to you in PM or something


    EDIT: Is there a command for neutral creatures? as I want to kill all neutral creatures when time is up
    Last edited by UnknownMaster21; October 12th, 2014 at 22:36.

  6. #6

    Default Re: Heroes destroys own doors if locked due the reason of what?

    Quote Originally Posted by UnknownMaster21 View Post
    Good one!


    But, there isn't parties, well wait when I get a possess spell script working right, I will upload it on to you in PM or something
    Well, change the map so that there are parties. If you've now placed a group of heroes at a certain spot with the map editor, remove them again and place an action point there. Then use the script to spawn a party of exactly those heroes at that location.

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

    Default Re: Heroes destroys own doors if locked due the reason of what?

    Quote Originally Posted by YourMaster View Post
    Well, change the map so that there are parties. If you've now placed a group of heroes at a certain spot with the map editor, remove them again and place an action point there. Then use the script to spawn a party of exactly those heroes at that location.
    It is okay, I found it rather scary and cool feature when I changed gameplay to first person :P

    EDIT: Is there a command for neutral creatures? as I want to kill all neutral creatures when time is up
    EDIT2: I found there is no command for this one, am I right? but what if I use a command with all creatures, will neutral creatures die when I use kill creatures?

  8. #8

    Default Re: Heroes destroys own doors if locked due the reason of what?

    There is no command for neutral creatures. I do not know if they are counted with 'ALL_PLAYERS'. Be sure to let us know when you've tried it.

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

    Default Re: Heroes destroys own doors if locked due the reason of what?

    Quote Originally Posted by YourMaster View Post
    There is no command for neutral creatures. I do not know if they are counted with 'ALL_PLAYERS'. Be sure to let us know when you've tried it.
    Yeah have to check it out!

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

    Default Re: Heroes destroys own doors if locked due the reason of what?

    Sorry for the double post but here is another problem, as ALL_PLAYERS for the kill command doesn't work for neutral creatures, here is an alternative script, which does not work at all! ( Might be an error as well, though no error log )

    Code:
    IF(PLAYER0,TOTAL_CREATURES <= 0)
    QUICK_OBJECTIVE(6,"You have no creatures left, which means you are defeated keeper!",PLAYER0)
    LOSE_GAME
    ENDIF
    
    IF(PLAYER0,TOTAL_CREATURES == 1)
    MAGIC_AVAILABLE(PLAYER0,POWER_POSSESS,1,1)
    ENDIF
    
    
    IF(PLAYER0,GAME_TURN >= 6000)
    MAGIC_AVAILABLE(ALL_PLAYERS,POWER_POSSESS,0,0)
    ENDIF
    
    IF(PLAYER0,GAME_TURN >= 6000)
    IF_CONTROLS(PLAYER0, IMP <= 0)
    QUICK_OBJECTIVE(7,"You failed to rescue your imps in time. You have been defeated!",ALL_PLAYERS)
    LOSE_GAME
    ENDIF
    ENDIF
    
    IF(PLAYER0,GAME_TURN >= 5780)
    IF_CONTROLS(PLAYER0, IMP <= 0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,DEFEAT,+4,1)
    ENDIF
    ENDIF
    As I try to make neutral creatures to die for the death party ( lvl 10 Avatar will show up and defeat all, it is used for fun, as you won't have a chance to defeat him anyway) if player won't make it in time to rescue imps ( captuirng them to own side), well, this method doesn't work anyway because when game turn gets longer, I am defeated anyway.

    keeperlog says no errors, maybe I should put as flagged state, but, I do not know

Similar Threads

  1. Teleporting behind locked doors
    By mefistotelis in forum KeeperFX
    Replies: 11
    Last Post: June 21st, 2014, 20:13
  2. Replies: 2
    Last Post: February 9th, 2014, 18:08

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
  •