Results 1 to 5 of 5

Thread: script questions

  
  1. #1
    Imp
    Join Date
    Jan 2014
    Location
    Netherlands
    Posts
    33

    Question script questions

    when using this code it works, but when the new imps die, the spell isn't available again.
    also when using the next_command_reusable it lets me create multiple imps, instead of the max of 2 imps.
    and lets me keep the imp spell
    Code:
    IF(PLAYER0,IMP ==0)
    MAGIC_AVAILABLE(PLAYER0,POWER_IMP,1,1)
    ENDIF
    
    IF(PLAYER0,IMP ==2)
    MAGIC_AVAILABLE(PLAYER0,POWER_IMP,0,0)
    ENDIF
    I also wanted to use the broken into command
    assuming it means breaking down fortified walls with the destroy walls spell.
    Code:
    if(player_good,times_broken_into =1)
    magic_available(player0,power_destroy_walls,0,0)
    endif
    tried >0 didn't work either

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

    Default Re: script questions

    You could create more imps because of "==" instead of ">=", not because of reusable comand.
    Avoid equality, use ">" or "<", or ">=" or "<=" instead. Equality may lead to the game not noticing the condition (ie. if you will create several imps quickly, the game may check the "== 2" condition when you have already 3 or more imps).

    If you're using KeeperFX - start the map in it, and then exit and look at log file - it will have warnings in case of any typos or other errors in script.

  3. #3

    Default Re: script questions

    Quote Originally Posted by Edwin View Post
    I also wanted to use the broken into command
    assuming it means breaking down fortified walls with the destroy walls spell.
    Code:
    if(player_good,times_broken_into =1)
    magic_available(player0,power_destroy_walls,0,0)
    endif
    tried >0 didn't work either
    It means the number of times your dungeon has been breached, so simply whenever a hero or keeper has dug into one of your rooms and you hear the sound-effect. For you it doesn't work because you have '=' instead of '=='. Just to be sure it actually works, also use '>=' for this bit.

  4. #4
    Imp
    Join Date
    Jan 2014
    Location
    Netherlands
    Posts
    33

    Default Re: script questions

    the imps now work.
    can't seem to destroy a player_good wall, and lose the destroy_walls spell.

    when using this i get the icon with the information, but i don't get the new creature and new room available icons
    Code:
    IF(PLAYER0,MONK >0)
    ROOM_AVAILABLE(PLAYER0,garden,1,1)
    QUICK_INFORMATION(1,"Build a garden which is now available to you, to feed your creature.",PLAYER0)
    ENDIF

  5. #5

    Default Re: script questions

    Quote Originally Posted by Edwin View Post
    the imps now work.
    can't seem to destroy a player_good wall, and lose the destroy_walls spell.

    when using this i get the icon with the information, but i don't get the new creature and new room available icons
    Code:
    IF(PLAYER0,MONK >0)
    ROOM_AVAILABLE(PLAYER0,garden,1,1)
    QUICK_INFORMATION(1,"Build a garden which is now available to you, to feed your creature.",PLAYER0)
    ENDIF
    I've tested the 'times broken into' variable, and it doesn't work for me either, so I've reported the issue.
    EDIT: Mefisto says this part of the game is still 'original dungeon keeper'. It indeed does not work in DK95 either, so most likely this will not be fixed for quite a while.

    The second part should simply work, to be sure we didn't miss a typo or something I copied it to a testmap and it works as intended. As soon as you get a monk you should receive access to the garden and the info should be displayed. If that doesn't happen for you there must be something else in your script that prevents this. If you don't know what, please share your script.
    Last edited by YourMaster; March 20th, 2015 at 22:51.

Similar Threads

  1. New script commands
    By mefistotelis in forum KeeperFX
    Replies: 89
    Last Post: May 18th, 2016, 08:04
  2. Script question.
    By Alarti in forum DK1 Mapmaking
    Replies: 13
    Last Post: January 4th, 2015, 00:12
  3. need help with script
    By Edwin in forum DK1 Mapmaking
    Replies: 5
    Last Post: March 18th, 2014, 08:52
  4. There is an error in my script??
    By Kerdinario in forum KeeperFX
    Replies: 4
    Last Post: June 2nd, 2013, 13:27
  5. Script error in level 20
    By friscmanseby in forum KeeperFX
    Replies: 1
    Last Post: June 19th, 2012, 03:36

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
  •