philx's Recent Forum Activity

  • i'm sure there is a way to do this. Try to work with touchID's every touch has his own ID. for a quick and dirty solution i would try to do something like this:

    global variable "singleTouchID"

    on touched "block" -> "singleTouchID" = touch.ID

    if touch.ID = singleTouchID -> destroy block

    now i dont know how fast construct reacts, but if your lucky the player will only destroy one of the blocks if he touches multiple ones the same time.

    i think there is something like touch.count too .. if i remember correctly .. then u could do stuff like:

    on any block touched -> if touch.count = 1 -> block - destroy

    just have a look at the touch expressions and properties ..

    cheers!

    EDIT:

    feyninja was faster .. i'd go with his solution.

  • I'd calculate some more time than one week per game .. i haven't deployed a self made game on app store yet but i've been following the C2's export to mobile device possibilities for a while now. I think it has become a lot better in comparison to when i started with it when appMobi and Intel XDK were used. a big problem which i encountered is: where do you get your sprites from? drawing them by yourself will also cost u a lot of time ..

    cheers!

  • my native language is swiss

    i understand almost everything written in english and if i struggle with a word at some point i will use dict.cc to get it translated.

  • aaallright i'll have a look this.

    Yann

    are you talking about the Timer behaviour of Rexrainbow?

    thanks for your help

  • i was friggin happy about this workaround until i found out it's not working for me if i call the function at the same time with different parameters.

    i have multiple spaceships which spawn different bullets. they are called p1_ship, p2_ship, p3_ship and p1_bullet, 02 ...

    i then have each bullets and ships in a family called all_ships and all_bullets.

    all_bullets | on created -> function | call "cooldown" (all_bullets.player).     - player is an instance variable which stores the player nomber to whom the bullet belongs

    then:

    + local static text persist = " "

    function | on "cooldown"

    -> system | set persist to function.param(0)

    -> [engine] | set value at (persist,1) to 1

    -> system | wait [upgrades].At(persist,13),2,2) seconds

    -> [engine] | set value at (persist,1) to 0

    -> system | set persist to " "

    where these are [arrays]

    this works fine if everybody shoots at different times, but if all characters shoot together, only one of them will get his cooldown reset after the wait time.

    i think this is because they all use the same local text variable when they call the function.

    is this possible? could you think of a fix?

    cheers! phil

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i do really struggle with my homing missiles. but by whole project is quite complicated.

    i have a family called all_chars with the four players in it p1_ship, p2_ship, p3... they all have an instance variable stored called "player" and the value of their player.

    i now have a power up which should spawn a homing missile. i tried every f*** thing and didn't get it to work.

    i stored the UID of the player who spawned the missile and let it chase the family all_chars for target which members dont have the same instance variable.

    i tried to do it with the UID. something like

    missile has target

    missile.turret.targetUID not equals missile.originUID -> unacquire target.

    i even tried it with for-loops, checked every player if he has the same instance variable as the missile and then acquired/unacquired the target.

    how can i except players out of a family from the target objects.

    problem is, my missile keeps chasing the wrong players and keeps exploding the wrong players.

    I'd be veeeeeery happy about a sample capx of an advanced sample capx of a good working homing missile.

    im afraid i can't share a capx because the scirra site is blocked from the content filter due to "games"

    cheers!

    phil

  • have you tried to trigger it with

    "on sprite spawned" -> pin thruster to it

    ?

    there is an example space shooter in C2 where they use thrusters too, have u had a look at that yet?

  • LittleStain

    thank you once more for your quick answer!

    i actually got mine to work right now, seems like i just misschanged something. it looks like this:

    system for "check" from 1 to 4

    -> [array], Value at (loopindex, 2) = 0

    -c> object instance variable = loopindex -> destroy

    -c> this is an additional condition and the -> a sub-event. then i threw in some more conditions for everything i want to destroy with the instance variable, which has a 0 in the array at It's X.

  • hey guys i am looking for a way to search through a row of a 2D Array, let's say i want to check for every X in Y=4, if the value is "1". and then do an action for every 1 found. i also need to use the x value for the found 1 as an expression.

    i have searched through the forum and didnt find something. i haven't got much experience with for-loops, but with arrays.

    so i guess the best solution is to do it with a for loop. i tried some stuff but didnt get it to work.

    somebody can help?

    thanks in advance

    phil

  • soooo i checked your capx and it's a very nice example.

    first i tried to do it in only one event by checking if the instance variable of the spawner aswell as the one of the player who dies the same is like parameter 0. that couldnt choose the right player to spawn, so i made it like you with 4 sub events for every player.

    you helped me a lot. thank you very much

  • ok i think i figured it out. the settings of my behaviours seem to reset every time my character dies. and on my start of layout i clear everything on the screen to build it up from the ground.

    i think to use "on [families] created" is the way to go.

  • Guizmus

    allright, that would have been too easy though xD

    yeah, actually my whole game is built with families and arrays. i'll definetly check your capx because i have to have a closer look at those UID's for another task ill come across further in my game development.

    i havent played around much with functions yet. i'll check the manual and see if i can build what u'r talking about.

philx's avatar

philx

Member since 27 Jan, 2013

None one is following philx yet!

Connect with philx

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Teacher One of your tutorials has over 100,000 readers
  • Email Verified

Progress

15/44
How to earn trophies