lokken's Recent Forum Activity

  • I have a spritefont that I want to use multiple times for items to illustrate how many of the same item the player has collected.

    What is the proper use? Do I "Clone" each one, does that make a new image for each use in the game, taking up unneeded file size? Or do I target a font's UID object to reflect the variable of how many the player has collected? I don't want 25 spritefont clones of the same image. All numbers will be showing at the same time as in the picture below.

    How would you output different variables using the same spritefont to different objects?

    https://cdn.pbrd.co/images/hSQKwhsrK.jpg

    Thank you!

  • That seems to do the trick on a basic level, add a vertical sine to the ScrollTo object, with a small magnitude and a few seconds to the period. It gives the look of being on a boat or moving vehicle. I might add another sine moving horizontal, or a shallow zoom periodically.

  • I have a scene in my game where the player is in a moving vehicle, and I would like to add a handheld mild shaky camera-view loop to it. I have an invisible object that is tied to center screen and have the border limiting option turned off, so I can get a shake, but I'm just not program savvy enough to set every x,y coordinates of a camera's movement pattern. Any tips? Maybe set the object to a sine?

  • I seem to be getting it to work on 1 controller in a 2.0 slot, when a 2nd controller is plugged into a USB 3.0 port at the same time. I have 2 USB 2.0 ports and 2 USB 3.0 ports on my front panel. C2 only recognizes the inputs when 2 gamepads are plugged into specific ports. Does any of this make any sense? Code works. C2 seems to work.

    Is there any hidden code that C2 goes through to determine which controller it picks up? Outside of the Gamepad 0, Gamepad 1 indexing code that is built in for users? My code is only for Gamepad 0, there is no other 2nd programmed gamepad.

  • C2 recognizes when my controller is plugged in and when it's disconnected in multiple C2 games, but it does not recognize the button presses in those games nor in mine. It can't be my code, it's happening to other C2 games as well.

    My gamepad is a Logitech F310, it works, I verified it with some Steam games, and with Windows 7 "Set Up USB game controllers" application. OS recognizes the inputs.

    Here's the code I'm working with...I have OR statements with keyboard inputs that respond normally with the same shared actions when the keys are pressed.

    Could there be a missing plugin update or am I plugging my controller into the wrong USB? Is it the browser? I exported my game to node webkit using NW.js and same result. It's got to be something simple, a setting somewhere...

    Thank you.

  • I think I know what you mean now. Can you use the Sprite variable to filter between what is collected and what is not collected?

    On collision: Opacity set 0 collision Disable Sprite Variable = 1 On Reset Opacity set 100 Collision Enable Sprite Variable = 0 On 2nd Layout Start: If Sprite Variable = 0 Opacity Set 0 Collision Disabled On 1st Layout Start: If Sprite Variable = 0 Opacity Set 100 Collision Enable

  • Thanks eli0s. I've heard of this Boolean from time to time, maybe it's time I sit down and meet Boolean. It sounds like that might work.

  • Thanks guys! I was able to disable collision and opacity to 0 for the coins when colliding with player. The coins are part of a Family, so on restart I put the Family back to collision enabled, and opacity to 100.

    This still shows Global items in other layouts when you don't want them there, but luckily I hide the Family and collision when I didn't need them anymore, for a game over or winning layout.

    One issue I might have in the future, if you go to a layout that has global items from a previous layout still showing (coins that weren't collected), how do you hide the ones that weren't collected, but still have them show when the player goes back to that layout (so the game remembers coins not collected, and shows them again). I am bypassing this issue right now by making an extremely large layout where global sprites would not share the same X,Y coordinates on different layouts.

  • Will there be a plugin/update to send API code to the Newgrounds medal system?

    I've searched for some literature on this about a month ago, and found only that Nutcasenightmare's work here http://www.newgrounds.com/projects/games/646548/preview was able to craft html5 code to work with NG's medal system.

    As a new Construct2 User, I am not program-savvy enough to edit js/html5 code to set an event to send API code that works. It would be awesome to get that into an eventsheet in C2! I only found 1 HTML5 game on Newgrounds that uses the medal system, nutcasenightmare's here http://www.newgrounds.com/portal/view/634741

    I think this sort of update would be a big step for integrating HTML5 into websites. Maybe doubles for Steam achievements?

  • I have a game with global sprite coins scattered across a vast and wondrous land. The player picks them up. Poof, they are destroyed and added into the score variable.

    Suddenly, the player dies (or beats the game) and wants to replay the game.

    Upon replay, the global sprites are gone (remember they were destroyed).

    I know how to reset the global variables, but how do you restore/create the global sprites to their original layout position? ...without painstakingly create-object each item in a position. There's hundreds of them!

    **Do I have to not destroy them and set position -100,-100, upon replay layout, it will reload position? Any other solution?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a sub-question for anyone... How do you target a specific UID? Let's say 3 boxes are shown, same sprite, but you only want 1 of them with collision on it. In the events, how do you target the UID to turn 2 collision off, while keeping the 1 on?

  • I'm making a game that has a street layout full of buildings. On the street, there are items you can pick up. You can enter each building (new layout). In each building, there are items you can pick up. All of the pick-up items are "Global" so they will stay fixed until the Player picks them up.

    Problem: They are "Global" and will appear in other layouts. Items on the street will appear in the building, items in one buildings will appear in other buildings, probably because they share the same X,Y on their layout.

    Is the only answer to this by making a HUGE layout size, where items will not share the same X,Y? I'm making a layout of 5000x8500 that contains all of the buildings' interiors. That should not affect building-to-building pick up items from appearing in a different room.

    Is there another way to prevent "global" items from appearing in other layouts with a simple code? Or keep them contained within 1 layout and not reappear on start layout AFTER they have been collected?

lokken's avatar

lokken

Member since 25 Jan, 2014

None one is following lokken yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies