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

Thread: Mistress+Bile Demon+Troll = Tentacle ? / How many imps computer creates normally?

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

    Default Several questions for scripting/wondering/else

    Hello!
    KeeperFX 0.4.5
    As I have no idea about is it really a bug or feature or whatever it would cause it, but as I am done a custom map, completely plain, only added all creatures in a pool and 4 players + good player, making total approximately 150-155 creatures ( depending on computer created imps ), I try to sacrifice for having horned reaper in purpose, instead of that, I get a tentacle. Error?

    Also, computer players creates imps how many? 13? ( Because, I see computer creates them even more, or earlier imps must have died mystically somehow.) Anyway...
    Last edited by UnknownMaster21; October 9th, 2014 at 01:18.

  2. #2

    Default Re: Mistress+Bile Demon+Troll = Tentacle ? / How many imps computer creates normally?

    Hello.

    Sacrificing a Spider and a Troll gives you a Tentacle. So perhaps you've already tossed a spider in the temple earlier, so when you add the troll for the reaper, the tentacle is created. Try trowing in another troll.

    I don't completely understand what you're trying to say in your second paragraph,... you see the computer player making imps while you think he already has enough?
    In any case, there is not a fixed number of imps that are created by the computer player. It depends on the map and the 'Computer Player' chosen.

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

    Default Re: Mistress+Bile Demon+Troll = Tentacle ? / How many imps computer creates normally?

    Quote Originally Posted by YourMaster View Post
    Hello.

    Sacrificing a Spider and a Troll gives you a Tentacle. So perhaps you've already tossed a spider in the temple earlier, so when you add the troll for the reaper, the tentacle is created. Try trowing in another troll.
    Hmm, have to try it next time ( today )
    Quote Originally Posted by YourMaster View Post
    I don't completely understand what you're trying to say in your second paragraph,... you see the computer player making imps while you think he already has enough?
    In any case, there is not a fixed number of imps that are created by the computer player. It depends on the map and the 'Computer Player' chosen.
    Okay, then I have to ask, is there an option to check how many imps everyone can have?

    like TOTAL_IMPS <=13, ALL PLAYERS -> dismissing the spell imp

  4. #4

    Default Re: Mistress+Bile Demon+Troll = Tentacle ? / How many imps computer creates normally?

    Yes, there is.

    Here is a piece of script to remove the imp spell from the blue keeper when he has 13 or more imps, and give it back when he has 12 or fewer imps:
    Code:
    IF(PLAYER1,IMP >= 13)
    	MAGIC_AVAILABLE(PLAYER1,POWER_IMP,0,0)
    ENDIF
    IF(PLAYER1,IMP <= 12)
    	MAGIC_AVAILABLE(PLAYER1,POWER_IMP,1,1)
    ENDIF
    What is also possible, is to kill the 14th imp with the kill_creature command, but that way the computer player will lose money on casting the create imp spell for no reason.

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

    Default Re: Mistress+Bile Demon+Troll = Tentacle ? / How many imps computer creates normally?

    Quote Originally Posted by UnknownMaster21 View Post
    is there an option to check how many imps everyone can have?

    like TOTAL_IMPS <=13, ALL PLAYERS -> dismissing the spell imp
    If ALL_PLAYERS in used in IF, then the condition must be true for all of the players in order to execute commands inside. ie:
    Code:
    IF (ALL PLAYERS, TOTAL_IMPS <=13)
    REM commands inside
    ENDIF
    will execute commands inside only when each and every player have less than 14 imps.
    If any of the players exceeds that amount, the condition will not be met.

    Note: with LEVEL_VERSION(1), you should use TOTAL_DIGGERS. details: https://code.google.com/p/keeperfx/w...ScriptCommands

    Also, you can use IMP instead of TOTAL_IMPS if you want to count creatures which player owns and controls (are not captured by enemy). This also changes with LEVEL_VERSION(1), because with it there's a separate IF_CONTROLS() command, and IF() always gives total amount.
    Last edited by mefistotelis; October 5th, 2014 at 18:27.

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

    Default Re: Mistress+Bile Demon+Troll = Tentacle ? / How many imps computer creates normally?

    Wow, nice! Thanks keepers!

    Works as should work! BTW, it is 28 IF commands limited per map? I saw it something like this somewhere, but I do not find it ( it is not I am going to reach it, but if having objectives or somewhat "A long journey", might take some as displaying objectives and informations keeps player interested or so)

  7. #7

    Default Re: Mistress+Bile Demon+Troll = Tentacle ? / How many imps computer creates normally?

    Quote Originally Posted by UnknownMaster21 View Post
    Wow, nice! Thanks keepers!

    Works as should work! BTW, it is 28 IF commands limited per map? I saw it something like this somewhere, but I do not find it ( it is not I am going to reach it, but if having objectives or somewhat "A long journey", might take some as displaying objectives and informations keeps player interested or so)
    48 IF-statements.

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

    Default A new problem!

    Thanks YourMaster

    Anyway, I got stuck once again, now here is the mystery:

    When All 3 other keepers are gone, but Good player's Dungeon Heart is still alive:

    I want to make something like this:

    IF Player0 have destroyed ( or they have destroyed anyway) all 3 other keeper's dungeon hearts, a quick objective will pop out with zoom in parameter to the good player's dungeon heart, and spell power destroy walls will be available:

    IF(ALL_PLAYERS,DUNGEON_DESTROYED == 3)
    QUICK_OBJECTIVE(11,"Objective with zoom parameter",PLAYER0)
    ENDIF

    IF(ALL_PLAYERS,DUNGEON_DESTROYED == 3)
    MAGIC_AVAILABLE(PLAYER0,POWER_DESTROY_WALLS,1,1)
    ENDIF

    SET_FLAG(PLAYER0,FLAG0,0)

    IF(PLAYER_GOOD,DUNGEON_DESTROYED == 1)
    SET_FLAG(PLAYER0,FLAG0,1)
    ENDIF

    IF(PLAYER0,FLAG0==1)
    SET_FLAG(PLAYER0,FLAG1,0)
    ENDIF

    IF(PLAYER_GOOD, TOTAL_CREATURES == 0)
    SET_FLAG(PLAYER0,FLAG1,1)
    ENDIF

    IF(PLAYER0,FLAG1==1)
    QUICK_OBJECTIVE(12,"Text for praise",PLAYER0)
    WIN_GAME
    ENDIF


    Yes, the whole level will be won if all heroes and dungeon heart is destroyed: I bet this isn't right at all

    If someone would have a free time for solving this before me ( and getting things faster, who knows what will come), I would appreciate it

    EDIT: Bonus Question:

    Can you really ally with good player at all?
    Last edited by UnknownMaster21; October 9th, 2014 at 01:37.

  9. #9

    Default Re: Mistress+Bile Demon+Troll = Tentacle ? / How many imps computer creates normally?

    I think this is what you want:

    Code:
    LEVEL_VERSION(1)
    
    IF(PLAYER1,DUNGEON_DESTROYED == 1)
    	IF(PLAYER2,DUNGEON_DESTROYED == 1)
    		IF(PLAYER3,DUNGEON_DESTROYED == 1)
    			QUICK_OBJECTIVE(1,"Destroy the heroes would you.",PLAYER_GOOD)
    			MAGIC_AVAILABLE(PLAYER0,POWER_DESTROY_WALLS,1,1)
    		ENDIF
    	ENDIF
    ENDIF
    
    IF(PLAYER_GOOD,DUNGEON_DESTROYED == 1)
    	IF_CONTROLS(PLAYER_GOOD,TOTAL_CREATURES <= 0)
    		QUICK_OBJECTIVE(2,"You rock!",ALL_PLAYERS)
    		WIN_GAME
    	ENDIF
    ENDIF
    You can't say 'IF(ALL_PLAYERS,DUNGEON_DESTROYED == 3)'. It is a boolean value, so either 0 or 1 is allowed. So 'ALL_PLAYERS,DUNGEON_DESTROYED == 0' means there is at least one player (player good for example that is not destroyed), and 'ALL_PLAYERS,DUNGEON_DESTROYED == 1' means 'All players are destroyed'.

    I haven't tested it, by my guess is it is impossible to ally to the heroes. Worth trying though!

    Code:
    ALLY_PLAYERS(PLAYER_GOOD,PLAYER0,1)
    Last edited by YourMaster; October 9th, 2014 at 09:51.

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

    Default Re: Mistress+Bile Demon+Troll = Tentacle ? / How many imps computer creates normally?

    Oh, I never thought ENDIF commands work similar to { }.

    I also saw LEVEL_VERSION(1), maybe without that not all the commands could work properly.

    Now here is the special catch.

    I have putted some scripts on each objective what player0 could achieve. Now, check this out please:

    If Player0 have destroyed for example, Player2's dungeon, the quick objective ( actually, it is a report, I use reports rather than in objective than information) will show up, but then again, if all keeper dungeons are destroyed, would it be possible, if it is automatically "overwritten" or would I say, skipped the objective to the new objective, where heroes are now the target?

    Sorry for having mess, but I do like maps where have putted a lot of effort, and I want to do same. Once I handle this well, it will start to have something new maps or even a campaign, with my playstyle what I like to use.

    ( I also test now, can with good to be an ally )

    EDIT: if the answer is simply yes, no problem ( I will get it to find myself anyway, forgot that lol)
    Last edited by UnknownMaster21; October 9th, 2014 at 10:24.

Similar Threads

  1. Bile Demon Sculpture
    By John Casey in forum Off Topic
    Replies: 3
    Last Post: April 24th, 2014, 23:16
  2. Skeleton fights Bile Demon bug
    By Kerdinario in forum KeeperFX
    Replies: 2
    Last Post: January 2nd, 2013, 13:22

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
  •