Results 1 to 5 of 5

Thread: IF(PLAYERX,TOTAL_DIGGERS >= 13) Command not working properly

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

    Default IF(PLAYERX,TOTAL_DIGGERS >= 13) Command not working properly

    Hello, as mefistotelis and YourMaster have helped me for the scripting commands, I have got stuck once again, maybe about misunderstanding criteria

    Here is the script ( the part of needed one)
    Code:
    LEVEL_VERSION(1)
    
    ADD_CREATURE_TO_POOL(IMP,20)
    
    CREATURE_AVAILABLE(ALL_PLAYERS,IMP,0,0)
    
    IF(PLAYER1,TOTAL_DIGGERS >= 13)
    	MAGIC_AVAILABLE(PLAYER1,POWER_IMP,0,0)
    ENDIF
    IF(PLAYER1,TOTAL_DIGGERS <= 12)
    	MAGIC_AVAILABLE(PLAYER1,POWER_IMP,1,1)
    ENDIF
    
    IF(PLAYER2,TOTAL_DIGGERS >= 13)
    	MAGIC_AVAILABLE(PLAYER2,POWER_IMP,0,0)
    ENDIF
    IF(PLAYER2,TOTAL_DIGGERS <= 12)
    	MAGIC_AVAILABLE(PLAYER2,POWER_IMP,1,1)
    ENDIF
    
    IF(PLAYER3,TOTAL_DIGGERS >= 13)
    	MAGIC_AVAILABLE(PLAYER3,POWER_IMP,0,0)
    ENDIF
    IF(PLAYER3,TOTAL_DIGGERS <= 12)
    	MAGIC_AVAILABLE(PLAYER3,POWER_IMP,1,1)
    ENDIF
    As you can see, I want to restrict the amount of Total imps. It is using probably a latest script command method, but it is not working properly.

    Problem: Every player, Human or computer can have more than 13 imps without any restrictions. Same happens if lowering the limit, no limit is showing up

    Any ideas?
    Last edited by UnknownMaster21; October 10th, 2014 at 21:46. Reason: Being more specific

  2. #2
    Awakening Game Master Metal Gear Rex's Avatar
    Join Date
    Sep 2009
    Posts
    5,689

    Default Re: IF(PLAYERX,TOTAL_DIGGERS >= 13) Command not working properly

    Just replace "TOTAL_DIGGERS" with "IMP". I don't think TOTAL_DIGGERS is even a proper variable.
    Dungeon Keeper 2 Patch: With More Balance and Pie [Hiatus]
    Forever Hiatus. Probably. Latest Version: 3.5 w/Levels 1-11 Revised.

    The Awakening: GM Powers Activate!
    Tesonu is napping!

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

    Default Re: IF(PLAYERX,TOTAL_DIGGERS >= 13) Command not working properly

    Quote Originally Posted by Metal Gear Rex View Post
    Just replace "TOTAL_DIGGERS" with "IMP". I don't think TOTAL_DIGGERS is even a proper variable.
    But with LEVEL_VERSION(1) it should be used with that.

    Btw, I tried it, and guess what, it did not work either. No matter if using with LEVEL_VERSION(1) or not.

    I think the problem might be then elsewhere


    EDIT: Sorry, it worked when used IMP, the problem was have to use only IMP and not IMPS or TOTAL_IMP or TOTAL_IMPS

    Typo, nothing more

    Thanks!


    can be locked this thread
    Last edited by UnknownMaster21; October 10th, 2014 at 21:59.

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

    Default Re: IF(PLAYERX,TOTAL_DIGGERS >= 13) Command not working properly

    Yes, with LEVEL_VERSION(1) the variable name is "TOTAL_DIGGERS".

    To check if the script is correct in sense of syntax:
    1. start the map in KeeperFX
    2. Exit the game just after start
    3. Look into keeperfx.log - there will be error message if a command wasn't understood by the game.

    Anyway, what you want in this specific case is most likely NEXT_ COMMAND_REUSABLE.

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

    Default Re: IF(PLAYERX,TOTAL_DIGGERS >= 13) Command not working properly

    Quote Originally Posted by mefistotelis View Post
    Yes, with LEVEL_VERSION(1) the variable name is "TOTAL_DIGGERS".

    To check if the script is correct in sense of syntax:
    1. start the map in KeeperFX
    2. Exit the game just after start
    3. Look into keeperfx.log - there will be error message if a command wasn't understood by the game.

    Anyway, what you want in this specific case is most likely NEXT_ COMMAND_REUSABLE.
    Roger! Anyway, I am ready to upload my maps to the internet! It ihas part1 and part2, ( but if good results, I am seriously planning for whole campaign, in there, I might need some help too, but I have to of course learn myself a bit or more) I will update them to DK1 Maps

Similar Threads

  1. Replies: 10
    Last Post: August 26th, 2017, 00:57
  2. Replies: 0
    Last Post: February 15th, 2014, 20:25
  3. Launcher doesnt run properly.
    By D@nzingtree in forum KeeperFX
    Replies: 8
    Last Post: November 19th, 2013, 14:21
  4. Command Line, How to use?
    By Xorro in forum KeeperFX
    Replies: 2
    Last Post: September 13th, 2012, 16:51
  5. ENSIGN_ZOOM in LOF files doesn't work properly
    By DragonsLover in forum KeeperFX
    Replies: 6
    Last Post: August 8th, 2011, 03:29

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
  •