AlexFrancois's Forum Posts

  • cranberrygame

    Thank you Sang, you're awesome

  • cranberrygame Hi Sang, the Cordova Unity Ad plugin works great with android, but it doesn't seem to be working with XDK built iOS apps.

  • ludei

    here's a screenshot from thatserafimkid demonstrating the same issue

    This is the error i get in the developer app.

    -I've exported with cordova,

    -set minify off

    -deleted the config and intel addition files

    -put everything in a www folder and zipped it(ive also tried it without putting it in a folder)

    -I uploaded to the cocoon site, selected canvas +

    -removed the whitelist plugin(I also deleted all cranberry plugins from my project)

    I don't know where else to go from here. I keep getting a black screen and that error in the debugger.

    Any suggestions

  • ludei

    I'm having no luck exporting a very basic Android test project which features no plugins. Deleted the config file and removed whitelisting. The Canvas+ apk opens in a tiny window and flickers, accepting no touch input. I've tried it in developer app and get the error "cannot open the javascript file "cordova.js: IllegalArgumentException"

  • It would if you told it to.. Haha..

    But Rex has also made a time_away plugin which counts the time since the last session..

    Just beat you to it haha, thanks for the help

  • I would suggest using the date time plugin..

    It knows the days in a month and the months in a year and the minutes in a day..

    Does it really? If I were to check if the current time was greater than a saved time of 22.00 +4 hours, would it know to check for 02.00 rather than 26.00?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Create a variable in the enemy sprite called instance and make it different for each one, then make a sub-event with the condition is enemy 'instance' 1 and so on...

  • Hi. I'm trying to make a timer that can knows how much time has passed since the game was last played/since a variable was changed.

    A good example would be Crossy Road which gives a free gift every four hours.

    Basic timers only run when the game is open, I need something that runs on system time. Creating a system using the date/time plugin seems way to complicated as you'd need to program it to know how many hours are in a day, how many days in the current month etc.

    Can anyone think of a simple solution?

  • Hey Joel, here are some of the key things that helped me build an efficient inventory with an array.

    Create only one sprite for the inventory items, this sprite should have a different animation for every item in the inventory with an appropriate name. Let's say that you have 8 visible slots in your inventory. At the start of each scene create 8 instances of the inventory item, even if you're inventory is bigger than 8 slots, it's only about the visible slots. Position each of these items in the appropriate place, I create an image point in the inventory bar animation and set each sprite to that position e.g: create object 'invitem' on layer GUI at 'InventoryBar.ImagePointX"item1" etc. etc. Then run a function that fills the items to correspond with the array. Here's mine:

    So this first sets a variable stored in my inventory array to 0, then for each instance of my inventory item sprite it sets the animation to whatever is in the array at the value of this variable. For example if the value saved into my array's X at 0 is "Hat" it will set the animation to "Hat". Just make sure you've create an animation called "Hat" and it will work. Then it adds 1 to the variable, so the second time it runs this loop it will set the animation to whatever is in the array's X at 1. If the value is 0 this means the slot is empty and it sets the animation to default, i.e. an empty picture.

    Moving the inventory left and right isn't too difficult. You create a variable, lets call it invScroll, and you add 1 to this variable when the left key is pressed and subtract 1 when the right key is pressed. You also run a function after changing the value of invScroll, i.e. every time you press left or right. This function is almost identical to the one above for arranging the inventory, except instead of: set animation to Inventory.At(Inventory.item) it will be set animation to Inventory.At(Inventory.item+invScroll)

    Hopefully that makes sense and is enough to get you started!

  • No need to pack the code in one event, you can just contain the skip code in a function and call it by the mouse or timer event

    Yes, that's how I'm doing it. I call a function, then have the wait for signal action. The function waits a specified amount of time depending on the length of dialogue, then calls the signal, or if the player doesn't want to wait, they can left click and this will also call the signal.

  • You could have done the same thing with functions as I see it, btw

    The same thing can't be done with functions, when a functioned is called it runs separately to the event which called it, meaning that if the function contains a wait action the event will keep running, only the function will wait.

  • did you ever figure this out?

    I'm about to start a dialogue skip feature and I was just browsing if anyone had done it. I think I'm going to use the "Is Tag Playing" and skip it that way. but it's going to be tricky since some of the audio is timed with animation..

    I didn’t really figure it out, and made a compromise instead. I created a variable that stored all the characters current text, if you clicked when a character is talking it would set the game time to 20, then restore it to 1 once the variable changed, i.e. when the next line of text appeared. Obviously it isn’t great as it means the whole game time speeds up, and you have to set object timescales individually to 1 to stop it from looking strange.

    MadSpy 's suggestion has just changes all of this though! I hadn’t even considered wait for signal, in fact I’d never even considered what this action did. Since reading this about 10 minutes ago, I’ve created a new system to skip text which works flawlessly! I wish I’d known about this 2 years ago! Now to go through hours of dialogue and add this new system! Thanks MadSpy , this is a game changer!

  • My iOS app is not forcing landscape, despite selecting landscape in both contruct 2 and XDK. The screen is still resizing to the devices orientation, which is a big problem on the ipod touch as it only allows portrait, making the game screen tiny and unplayable.

  • >

    > > AlexFrancois what makes you think webGL doesn't work on OSX? In all my testing it works fine, as it should.

    > >

    >

    > From my understanding webGL support was only added in os 10.10, I'm testing on 10.7 and no effects are rendered.

    >

    I am using a mac for my primary testing environment and can confirm pretty much all webgl effects have been working for me over 2 years now.

    Turns out it was gpu blacklisting on the 2009 macbook I'm testing on, thanks for the help. Hopefully I can have the mac version up on Steam by Wednesday!

  • AlexFrancois what makes you think webGL doesn't work on OSX? In all my testing it works fine, as it should.

    From my understanding webGL support was only added in os 10.10, I'm testing on 10.7 and no effects are rendered.