Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 25

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

  
  1. #11

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

    Code:
    IF(PLAYER0,TOTAL_CREATURES <= 0)
    	QUICK_OBJECTIVE(6,"You have no creatures left, which means you are defeated keeper!",PLAYER0)
    	LOSE_GAME
    ENDIF
    
    REM When the player has a creature, give him the spell Possess
    IF(PLAYER0,TOTAL_CREATURES == 1)
    	MAGIC_AVAILABLE(PLAYER0,POWER_POSSESS,1,1)
    ENDIF
    
    REM when 4.75 minutes in the game, if the player has no imps, spawn the party 'Defeat'.
    IF(PLAYER0,GAME_TURN >= 5780)
    	IF_CONTROLS(PLAYER0, IMP <= 0)
    		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,DEFEAT,4,1)
    	ENDIF
    ENDIF
    
    REM at 5 minutes into the game, take away the icon for the spell Possess
    IF(PLAYER0,GAME_TURN >= 6000)
    	MAGIC_AVAILABLE(ALL_PLAYERS,POWER_POSSESS,0,0)
    ENDIF
    
    REM At 5 minutes, if the player has no imps left, the player is defeated.
    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
    I've added some comments to the script, this should all work,... which part doesn't work? I just removed the '+' on the add party to level command.

    What doesn't work is to take away Power_possess, you can take away the spell icon, but when the player presses 'Shift' he can still use possess.
    Last edited by YourMaster; October 14th, 2014 at 14:37.

  2. #12
    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?

    mmm okay? but doesn't it need the + icon if spawned to @ action point? if hero gate needs a minus ( - )? or is it only needed for display objectives and so on?

    Because script command reference says it has to use + in there? have I messed up again then?

    Anyway, thanks for spending time with me, altough I really want to do this on my own.

  3. #13

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

    I don't know what script reference you have that says you need a plus,... yes, a hero gate needs a minus, that doesn't mean the action point gets the plus. The script reference even has an example:

    Code:
    REM ***** Add 2 copies of MY_PARTY to the  *****
    REM ***** level at Action Point 5. They    *****
    REM ***** belong to Player 3               *****
    
    ADD_PARTY_TO_LEVEL(PLAYER3,MY_PARTY,5,2)
    I did a Ctrl+F in the command reference, and it doesn't contain a single '+', so it is fair to assume no command needs it.

  4. #14

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

    Quote Originally Posted by YourMaster View Post
    What doesn't work is to take away Power_possess, you can take away the spell icon, but when the player presses 'Shift' he can still use possess.
    It looks like I'm talking to myself, but from nightly build 1422 this should no longer be the case. So UnknownMaster21, your script command will now work as intended.

  5. #15
    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
    It looks like I'm talking to myself, but from nightly build 1422 this should no longer be the case. So UnknownMaster21, your script command will now work as intended.
    Excellent!

    You can call me as UM21 as everyone else does globally in internet

  6. #16
    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?

    YourMaster, It does not work


    as here is the deal

    if player has no imps in time, player should lose ( works )
    if player has imps in time, player should continue ( not working )
    when time is up for DEFEAT ( avatar ), it should spawn ( works) ( the time is a bit wrong )
    when player has imps, but failed slightly in time to rescue them, DEFEAT should spawn ( works )
    if player has imps in time, avatar should not spawn ( not working )

    the thing is to get to the locked door with possession spell before it gets off in time to rescue imps, but DEFEAT and lose_game will still showing up even imps are got

    how to make script right? you have said it works ( yes, the whole thing works, but not as supposes )

  7. #17

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

    I need a bit more explanation in order to understand what you want to happen. That's why I commented the script, so it explains what I thought you wanted it to do,...

    Is this it?

    - If 5 minutes pass, and the player has no imps, he loses
    - If 5 minutes pass, and the player has no imps, the avatar spawns
    - If 5 minutes pass, and the player has at least one imp, he does not lose the game, but does not win either,...

    That is just this:
    Code:
    REM When the player has a creature, give him the spell Possess
    IF(PLAYER0,TOTAL_CREATURES >= 1)
    	MAGIC_AVAILABLE(PLAYER0,POWER_POSSESS,1,1)
    	SET_FLAG(PLAYER1,FLAG1,1)
    ENDIF
    
    REM If the player has no creatures anymore, he loses the game.
    IF(PLAYER0,FLAG1 = 1)
    	IF(PLAYER0,TOTAL_CREATURES <= 0)
    		QUICK_OBJECTIVE(6,"You have no creatures left, which means you are defeated keeper!",PLAYER0)
    		LOSE_GAME
    	ENDIF
    ENDIF
    
    REM at 5 minutes into the game, take away the icon for the spell Possess
    IF(PLAYER0,GAME_TURN >= 6000)
    	MAGIC_AVAILABLE(ALL_PLAYERS,POWER_POSSESS,0,0)
    	QUICK_OBJECTIVE(8,"5 minutes are up. You now have Possess",ALL_PLAYERS)
    ENDIF
    
    REM At 5 minutes, if the player has no imps left, the player is defeated and the avatar spawns.
    IF(PLAYER0,GAME_TURN >= 6000)
    	IF_CONTROLS(PLAYER0, IMP <= 0)
    		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,DEFEAT,4,1)
    		QUICK_OBJECTIVE(7,"You failed to rescue your imps in time. You have been defeated!",ALL_PLAYERS)
    		LOSE_GAME
    	ENDIF
    ENDIF
    In this code there are 2 lose conditions, if all your creatures are defeated, or if in 5 minutes time you have no imps.
    Does this work?

  8. #18
    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
    I need a bit more explanation in order to understand what you want to happen. That's why I commented the script, so it explains what I thought you wanted it to do,...

    Is this it?

    - If 5 minutes pass, and the player has no imps, he loses
    - If 5 minutes pass, and the player has no imps, the avatar spawns
    - If 5 minutes pass, and the player has at least one imp, he does not lose the game, but does not win either,...

    That is just this:
    Code:
    REM When the player has a creature, give him the spell Possess
    IF(PLAYER0,TOTAL_CREATURES >= 1)
    	MAGIC_AVAILABLE(PLAYER0,POWER_POSSESS,1,1)
    	SET_FLAG(PLAYER1,FLAG1,1)
    ENDIF
    
    REM If the player has no creatures anymore, he loses the game.
    IF(PLAYER0,FLAG1 = 1)
    	IF(PLAYER0,TOTAL_CREATURES <= 0)
    		QUICK_OBJECTIVE(6,"You have no creatures left, which means you are defeated keeper!",PLAYER0)
    		LOSE_GAME
    	ENDIF
    ENDIF
    
    REM at 5 minutes into the game, take away the icon for the spell Possess
    IF(PLAYER0,GAME_TURN >= 6000)
    	MAGIC_AVAILABLE(ALL_PLAYERS,POWER_POSSESS,0,0)
    	QUICK_OBJECTIVE(8,"5 minutes are up. You now have Possess",ALL_PLAYERS)
    ENDIF
    
    REM At 5 minutes, if the player has no imps left, the player is defeated and the avatar spawns.
    IF(PLAYER0,GAME_TURN >= 6000)
    	IF_CONTROLS(PLAYER0, IMP <= 0)
    		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,DEFEAT,4,1)
    		QUICK_OBJECTIVE(7,"You failed to rescue your imps in time. You have been defeated!",ALL_PLAYERS)
    		LOSE_GAME
    	ENDIF
    ENDIF
    In this code there are 2 lose conditions, if all your creatures are defeated, or if in 5 minutes time you have no imps.
    Does this work?
    No good. I still get defeated and also the DEFEAT party as well even if imps are rescued ( to captured to own)

    yes, two lose conditions:

    No creatures
    no imps in time

    otherwise continuing the realm

    I changed the Quick_Objective (8) to Quick_Information, in case the objective would not show up, but I wanted that in this way anyway

    EDIT: what if I just change the whole map to you? if it is better to look at it?

    interesting if this does not work


    EDIT: oh, btw, what version it should be used? as I use 0.4.5 as i want to use it as "official" ones and I also believe there will come new version before my maps and campaign is ready, though I am in overall doing fast progress

    EDIT2: I know possess spell will not work correctly, but that is minor thing( and eventually will be fixed anyway as it looks )
    Last edited by UnknownMaster21; October 17th, 2014 at 23:36.

  9. #19

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

    Well, that explains it: The released version does not have the "IF_CONTROLS" command yet, so you will lose no matter how many imps you have. You need a recent nightly for this. (and there the possess spell works as you want it.)

    What you want would not be possible with the 0.4.5, the IF_CONTROLS command has been added specifically to tell the difference between creatures in prison and creatures not in prison..

  10. #20
    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?

    It works now with latest nightly build, thanks, I can continue on my own


    EDIT: still, no one knows the original question?

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
  •