dop2000's Recent Forum Activity

  • matriax

    Yes, your method of building tilemap is definitely better if buildings are rectangular. With complex shape buildings you might need to check overlapping for every pixel.

    What do you mean by sprites with alpha? Your buildings will have transparent parts ("windows") and you want to remove tiles in windows?

    You can make windows as another separate invisible sprite.

    So first you fill tiles where building sprites are, then erase tiles where window sprites are.

    Edit: Made a demo, with complex-shaped windows!

    https://www.dropbox.com/s/sywx2gcxi9qsh ... .capx?dl=0

    Cheers for the coffee! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Although it's all based on R0j0's original idea, you should be thanking him.

  • Here is an idea - set "Blend mode=source atop" for buildings and use tilemap as a mask. (and also as a solid surface for tanks)

    https://www.dropbox.com/s/bpy9vgw7df50z ... .capx?dl=0

  • I used it to output debug information (Browser->Log)

    https://www.scirra.com/manual/110/browser

  • Yeah, the order of conditions in an event matters.

    "If spr_test.var=0 -> Pick a random instance" first picks all instances with var=0 and then selects one random from them.

    "Pick a random instance -> If spr_test.var=0" first picks a random instance from all instances, and then checks if its var=0. If var<>0, the whole event will not be executed.

    By the way, you can optimize this code a bit. If you add Sprite1, Sprite2, Sprite3 to a family, you can spawn SpriteFamily and a random sprite will be created.

    For each spr_test Order By random(1) -> spr_test Spawn SpriteFamily
                                            spr_test Destroy
        If loopindex=4                   -> Stop loop   
    [/code:1xsq5tgj]
    
    That's it!
  • Oh, I know what could be the problem. Local variables in functions lose their values after wait.

    So you need to move all actions with wordScore above "Wait 2 seconds":

    Also, when Attack button is pressed and you return all letters to their start positions, you should also clear "isOccupied" variable for Sprite133.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It does work.

    If the word is entered correctly, then wordScore variable will contain the score for this word.

    Say, in my example the word "sensei" will give wordScore=12 and the word "itadakimasu" will give wordScore=20.

    Then it's up to you how you use this value. You can do "Skeleton subtract wordScore from Health".

  • Ok, since I recommended storing the list of all words in a single variable, I guess I have to help you with this one <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Here is an updated file:

    https://www.dropbox.com/s/pbhrnhvukaiw0 ... .capx?dl=0

    Note, I used an older version of your capx, from the previous post. So you should only take the code in Battle Animation group, ignore everything else.

  • Unfortunately, you can't do it in C2.

    When I need to delete an object in a big project, what I usually do is I rename it to something unique like "Delete12345".

    Then save the project as a folder (not as capx) and search all .xml files for "Delete12345".

  • Sorry, I misunderstood your question.

    Is this what you want?

    https://www.dropbox.com/s/ezda4r9ms4buh ... .capx?dl=0

  • 2) I would ask each player to press a button on their gamepad before the game starts.

    "Player 1 press any button"

    Then wait for any button pressed on any of 6 gamepads. When a button is pressed say on gamepad #5, save this number in a variable Player1Gamepad or in array:

    PlayerGamepads.At(1) set to 5

    You can also make a reverse array for convenience - GamepadsToPlayer:

    GamepadToPlayer.At(5) set to 1

    PlayerGamepads[x] will give you gamepad number for player x.

    GamepadToPlayer[y] will give you player number for gamepad y.

  • What type of object is your "answer"? Its icon looks different from the TextBox icon. Is it some custom plugin?

    Have you tried running the project in Debug Mode (ctrl-F4)? You can check the contents of the array, question, answer objects before pressing the button.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 260 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies