lionz's Forum Posts

  • You need to use the sprite object in the sub event and then compare sprite.animationframe = localstorage.key then apply the action sprite destroy

  • Assuming you are talking about the Mask object, and that the Mask is not in a container already with Collision object, the Mask doesn't relate to the Collision object. In your mind it does because you pinned it but for Construct logic you are not picking a Mask.

    You can put them in a 'Container', Mask and Collision, which means when you create Collision a Mask will be automatically created and also then that Mask relates to that Collision in events, which I think is what you want here.

    Once in a container you can remove all the sub event logic which isn't necessary such as the for each and the pick nearest instance to self. For example, collision var=null : set Mask animation to idle is all you would need.

    Also careful responding to your own post as it removes it from 'Unanswered Topics' and people sometimes miss it thinking someone responded.

  • Take a look at the 'Advanced Random' object, you can create a Permutation table which can generate a shuffled output of numbers from 1-300.

    So if the Permutation output is 97,3,155,9,88.... for example, you can access the values with AR.Permutation(0) which would be 97 and AR.Permutation(1) which would be 3.

  • Then localstorage.key

  • You can get the localstorage item then say if sprite.animationframe = localstorage.itemvalue

  • I made something similar and I set their go to point to something within a range like x=random(mouse.x-30,mouse.x+30), y=random(mouse.y-30,mouse.y+30), this gave the effect of gathering in a spot but not overlapping.

    If it needs to be really specific then you can decide where the positions are for the squad and assign each one an ID which is a specific position when you click, so the leader appears at mouse click, and the rest arrive at one of the other chosen positions based on their ID.

  • If you set the paint cards to 11,12,13 which they should be anyway really, you can use 'for each card (ordered)' by their value, then on an action you can use 'move to top/bottom' of layer.

  • This is a little complicated to explain, but if your event is bullet on collision with player > player destroy, then you need sub events to compare the bullet variable back to the shooter. Sub event would be something like pick player(shooter) where name = bullet.name (the variable that you mentioned to track the shooter).

    But there is a further problem, because you already narrowed picked instances to the player who was shot so 1 player, you need to open up the other players again to be picked, so first you need a sub event like system pick all players, then a further sub event with the above logic about using the bullet variable

    OR instead of using these sub events you can call a function that inside has the logic for picking the shooter and incrementing their variable and also does not have 'copy picked' enabled.

  • I guess it would be to set from array.at(curx,1) since that's where the json string is stored. Curvalue won't work as that would be curx,0 which is 'Vendors'

  • You will need to pick the instance so 'bullet on collision with player' condition, then action is increment player.variable.

  • If you add an Else it will run the events you want when there is no instance on screen

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm no artist but I think the strip needs to be exact dimensions so for example if your character animation is frames of 32 width and there are 4 frames then the strip needs to be width of 128 so it can be chopped correctly. If it looks offset then it means there is blank space or the frames are incorrect size.

  • You can select the number of sprites per row and the dimensions when you import. If it's still wrong then that means the image itself is offset and you have to fix it at the artist stage.

  • Adding system 'for each' shape to the condition should fix this

  • Contact customer support again, we are just Construct 3 users and can't help with this.