NickRimer's Recent Forum Activity

  • now.. I understand.. I think..

    you want to kill just monster you clicked on, even if bullet will fly through hordes of other monsters to reach your aim? we need to kill just clicked one and save others, yes?

    ok, let's do something like that:

    create global var ClickedMonsterID first

    I don't know you want to use mouse or touch, but let's use touch, it can simulate mouse by default

    Touch -> On tap monster
         ClickedMonsterID = monster.IID (or UID, no big difference for our example I think)
         <launch bullet with your parameters>
    
    On bullet collision with monster
         If monster.IID (or UID) = ClickedMonsterID
              bullet.Destroy
              monster.Destroy[/code:2wmzfc9o]
    of course, it can slow down game performance because of too many collision checks.
    
    Another way is better on my look but not so good because of one moment..
    So.. take all your monsters and toggle off [i]Collision[/i] property (to Disable value).
    And then code will be much easier:
    
    [code:2wmzfc9o]Touch -> On tap monster
         monster - Set collisions enabled = Enabled
         <bullet fire>
    
    On bullet collision with monster
         bullet.Destroy
         monster.Destroy[/code:2wmzfc9o]
    So, there will be just one monster who can collide with bullet.
    I don't know will it work or not, but you may try it. But you can use it only if you never need constant check of any other monster collisions (with obstacles for example).
    
    Try both and say your opinion.
  • emm.. when you check collision between monster and bullet, monster will be picked!

    On bullet collision with monster
    monster - Destroy[/code:h6mocc86]
    no need to pick this monster specially
    
    must work
  • Maybe my decision is very bold.. but..

    On laser collision with asteroid do: System -> Compare two values

    If you check by IID, smallest will be always 0. So check if asteroid.IID = 0 then...

    Also on collision you can assign var HitID = asteroid.UID

    Then just make some loop:

    Var min = 255
    System -> For each asteroid
         if asteroid.UID < min
              min = asteroid.UID[/code:wbx0bm0i]
    After loop end check, if min = HitID, you collide smallest UID asteroid.
  • Sorry for my BUG report. Because it's really NOT A C2 BUG!!!

    I've just made a very deep analysis of font files downloaded from that resource..

    And I notice that there is a data damage in cyrillic symbols!!!

    I will use another web-font-convert resource to achieve needed results.

    Sorry for wasting your time.

  • Problem Description

    As you can see in my profile I'm from Russian Federation, so cyrillic support is very necessary for me.

    But using Set Web Font action I can't take needed result. I see just some standart font (or RARE only some letters are looks like new font, but others - by default).

    This app was checked by some my friends in different ways of country - one result.

    Also I've checked different fonts. All checked fonts supports cyrillic char sets. I usually download them here: h-t-t-p :// ru (dot) fonts2u (dot) com

    Is it a bug or you just have no support for any char sets instead of latin?

    Can I dream to achieve this support in future?

    If there is no and will no support for my problem I understand that the only way is to use uncomfortable in preparation and using Sprite Font?

    Attach a Capx

    [attachment=0:1kdo69ko][/attachment:1kdo69ko]

    Description of Capx

    Capx does only Set Web Font action.

    You can find there 2 Text plugins with test phrases: upper - in russian, lower - in english

    Project contains 5 files: 4 different types of one font and stylesheet.css to describe them.

    Steps to Reproduce Bug

    • Just start preview

    Observed Result

    English text will take new style. And russian will not.

    Expected Result

    Both texts must take new style.

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: YES

    Operating System and Service Pack

    Windows 8.1

    also checked in Windows 7 SP1 and WinXP SP3

    Construct 2 Version ID

    C2 beta r198 (Steam version)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • so you need to understand what bullet is for what monster

    you can pick needed monster by his IID (for example)

    every bullet - some var instance, ex. MonsterID

    after shot make Bullet.MonsterID = needed Monster.IID

    then in cycle for every bullet you need to pick monster with IID = bullet.MonsterID and then Bullet -- set angle towards -- monster.X, monster.Y

  • Kill both 12 and 13 sub-events.

    Make an event (NOT sub-event) Bullet -- On collision with... Monster --> Bullet.Destroy

    Make an event (NOT sub-event) System -- Every tick --> Bullet -- Set angle Towards Monster.X, Monster.Y

    Why Bullet spawns Bullet? I think Player must spawn Bullet.

    Mmm.. try it. I think it will be more correct.

  • Hello men!

    This is your capx-source.

    I hope that it will be easy for you to understand all its mechanics.

    There are some comments inside, but if you want more - write me a personal message or post your questions right here! I'll give you all support on my capx-source.

    Attached image shows array structure.

    X-axis means monsters, Y-axis means heroes. Each index is a proper instance of monster/hero.

    Value on (X,Y) coordinates means == hero with (IID = Y) deal Value damage to monster with (IID = X)

    After monster death we search for maximum Value in a column with number equal to this monster IID.

    Y coordinate of this Value will be IID of hero who dealt max damage.

    Enjoy!

  • check this: maybe you made a Trigger once sub-event

  • correct expression of random between two values - n and m (where m > n):

    a = random(m - n + 1) + n

    you may need floor(random()) if you want integer values

  • well, I missed that moment about overall damage..

    the problem is that you can't create object instance variables through runtime, just modify existing ones

    maybe you need to create a special array for this? store player's names (only those who deal a damage) and a damage they dealt (add with every hit).

    you can use array indexes according to monster UID, it will guarantee their uniqueness and creates a simple link between monter instance and array data.

    need an example?

  • floor(random(500)) will just return integer numbers from 0 to 499 (0, 1, 2, ..., 498, 499).. I can't understand what are you asking for, sorry..

NickRimer's avatar

NickRimer

Member since 3 Feb, 2015

None one is following NickRimer yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies