IPHAT's Forum Posts

  • Have a look at the array's index expression.

    And how do i use this IndexOf expression? I saw it in the manual, but i don't understand what parameters it requires.

    EDIT: Ok i used IndexOf inside my RemoveItems function parameter, but it's returning -1 value. RemoveItems function requires two parameters, first is slot in inventory (X coordinate) and second parameter is amount of items to be removed. So function looks like this RemoveItems(arrInventory.IndexOf("9mm-bullets"), 1).

    As you can see i have "9mm-bullets" value inside array, but IndexOf is returning -1

  • facecjf if i understand this event sheet, you have already specified on what array slot different weapons will be and then you are just adding to this value.

    In my game inventory is little different - let's say that player will first pick up health box, then after few minutes handgun and bullets, so health box will be on slot 1, handgun on slot 2 and bullets on slot 3. But some other player can pickup handgun first, then bullets, then health box and now order will be different. I can't expect order of pickup, so i can't put always healthbox on first place, handgun on second and so on.

  • Right now i am making inventory system for my game and i have some issues with it.

    I would like to get location (X,Y) of the item, based on it's value.

    My inventory array looks like this:

    Frame Number

    Amount

    Name

    With frame number i am selecting picture to be shown in inventory, if amount is higher than 0. But with "Name" parameter i would like to find specific item in inventory and to increase/decrease it's amount.

    Let's say that i want to reload my gun. In game i have "Handgun" and "9mm ammo clip" items in my inventory. When player reload it's gun, one 9 mm ammo clip is removed from inventory. My problem here is how to refference this specific item in array. Right now i am adding items from inventory with function that has two parameters, number of frame to be shown and amount. When i am removing i must specify X location in array and amount to be removed.

  • Thanks! It's working!

    I thought that this angle is relative to the current value

  • I am trying to implement shotgun weapon in my game and right now it's only working when character is facing right.

    Normal weapons, like guns and rigfles are working just fine, but for some reason shotgun is not working.

  • Here is capx

    dropbox.com/s/y45pb1qyweowquk/sticker.capx?dl=0

  • > I have 5 objects of same type on the screen. When game is started i would like, when user click on this object to increase it's size. But right now size is increased of all objects of same type. Is there any way to increase size of just that instance of touched object?

    >

    Have you tried adding a "pick" event from System?

    I saw that but i don't know how to use it. How do i get ID of that touched object?

  • I have 5 objects of same type on the screen. When game is started i would like, when user click on this object to increase it's size. But right now size is increased of all objects of same type. Is there any way to increase size of just that instance of touched object?

  • Hello!

    I am developing photo sticker app! I made most of the app, but i have some questions/issues.

    In this app user is able to select frame and add stickers to his/her photo and then save it on the phone. App is working great in my browser on PC, but on android i am not able to select photo or use camera (i am able to do that when i am previewing my app inside Chrome browser on my phone, but not when i build it). I guess that i have to set permissions inside Intel XDK before building, but i don't know what to write inside permissions field.

    All i need is to select photo from storage or from camera, save photo on storage and post this image to Facebook. So what permissions i should write?

    Does Facebook require some Cordova plugins inside Intel XDK or some android permissions? Also is it possible to post canvas image to Facebook?

    Is it possible just to resize one object? I will have more then one sticker of same type and is it possible and how just to increase size of one, without increasing size of other? Right now if i have two stickers of the same type when i click on "Size Up" button during gameplay, all of them are resized

    CAPX: dropbox.com/s/y45pb1qyweowquk/sticker.capx?dl=0

  • scirra.com/forum/how-do-i-set-up-a-database-to-display-random-questions_t161753 How do I set up a database to display random questions?

    Thanks!

  • I found workaround when converting Excell to JSON.

    Because strings are missing extra " i just opened Notepad and replaced every " with "", and now everything is working fine.

  • I don't know if i am doing something wrong, but when i populate table and click on SAVE and then when i try to open that table again, it's empty now.

    EDIT: I have also tried to use Excell to JSON converter, but converted data is missing extra " character. Your converter is generating "data" instead of ""data""

  • I saw this scirra.com/tutorials/1418/trivia-game/page-1 tutorial, about making trivia quiz game and i understand it quite well, but i need quiz game with multiple correct answers and i don't know how to do that. Every question will have different amount of correct answers and when user click on answers and then click on OK button, correct answers should light in green and wrong in red color, and for every correct answer user will get 1 point.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Problem was with the origin point

    Thanks for help!!!

  • I dont think that problem is with groung, because i get this problem when i change character sprite, not ground sprite. When i come home i will send you capx file.