Stargoat's Forum Posts

  • Using the "Image Manipulator" plugin, simply run an event such as this...

    + System: Start of layout
    -> ImageManipulator: Load image AppPath+"newpic.png"
    -> ImageManipulator: Copy image to sprite Sprite 
    [/code:cfnd60wr]
    
    That will replace the sprite with the picture in the specified folder ("AppPath" means look in the .exe or .cap's folder).
    
    Hope that helps.
  • Could probably do that using the "date" object. I don't think there's an explicit "seconds since x", but if you hold the year, month, day etc. in a file on closing, you could probably compare those values against the current on opening.

  • Well, every object is "global" in construct, specificically identifying one as such just gives it properties of persistance throughout layouts, at runtime.

  • I know it's possible to copy and paste objects from one sheet to another, but it would facilitate operations if you could either drag them down from the object folder in the project bar, or have an option in the object bar to switch between the objects native to different layouts.

    Not strictly necessary, but maybe something to consider.

    Also, it seems a bit strange that the family manager does not have an option to include new family definitions not set beforehand.

  • It seems to work if you put the "bird_area" into container with "bird". You can also remove the event that spawns "bird_area", since it already gets created with "bird".

    Yep, this works.

    Containers are something that you should learn the function of.

  • If you want simple back and forth stuff, then you don't really need paths. There's a Sine behavior that you can use to make things move back and forth, or up and down repeatedly. If you want more complicated movement then you can fake paths by telling objects to move to certain coordinates, and when they reach those coordinates to start moving to new coordinates, etc.

    More complex enemy behaviour can be achieved with the timeline object, or with timers and other conditions. It can be a little tricky to get down, but with a bit of work, you can get some quite dynamic and interesting behaviour. It's obviously not quite as easy as drawing the enemy walk path like in KnP (haven't used MMF, maybe it's similar?).

  • No, this calls for the ... DUEL!

    What, like a game-off?

    I'm game.

    ...

    I mean, bring it on.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hold on, who's Stardog? I feel like my territory is being invaded here.

  • Just had another look at the .cap. Pairing the pedestrian and their clothes and then changing...

    + MouseKeyboard: Key P is down
    -> System: Create object NPCPedestrian on layer "Gameplay" at (MouseX, 1061)
    -> System: Create object PRE_HatGenerator on layer "Gameplay" at (0, 0)
    -> System: Create object PRE_ShirtGenerator on layer "Gameplay" at (0, 0)
    -> PRE_HatGenerator: Set 'PRE_HatRoll' to random(PRE_HatGenerator.GetAnimationFrameCount)
    -> PRE_HatGenerator: Set animation frame to PRE_HatGenerator.Value('PRE_HatRoll')
    -> NPCPedestrian: Set speed to 60 - random(30)
    -> MageDeathbeam: Place in front of NPCPedestrian 
    -> PRE_ShirtGenerator: Set filter to RGB(random(256) -50,random(256) - 50,random(256) - 50)
    [/code:l051qzjt]
    
    to
    
    [code:l051qzjt]+ MouseKeyboard: Key P is down
    -> System: Create object NPCPedestrian on layer "Gameplay" at (MouseX, 1061)
    -> PRE_HatGenerator: Set 'PRE_HatRoll' to random(PRE_HatGenerator.GetAnimationFrameCount)
    -> PRE_HatGenerator: Set animation frame to PRE_HatGenerator.Value('PRE_HatRoll')
    -> NPCPedestrian: Set speed to 60 - random(30)
    -> MageDeathbeam: Place in front of NPCPedestrian 
    -> PRE_ShirtGenerator: Set filter to RGB(random(256) -50,random(256) - 50,random(256) - 50)
    [/code:l051qzjt]
    
    Seems to work perfectly, as far as I can tell. Lots of pedestrians spawn, but they did so in the un-modified .cap, so I assume that's how it's supposed to be.
    
    Just one other thing I'll point out... I checked the unlimited FPS for that layout, and I got but 100 frames a second. Considering my computer isn't terrible, that's getting pretty close to what I'd consider as the lower limit to the FPS you'd want to get. Might want to look into the efficiency of the .cap... in particular, you're using a lot of shader effects that might not be adding that much to the experience, but are still taking a massive toll on the video card.
  • .ini files can hold as many variables as have been declared in the .ini file its-self.

    [Groups Are Declared Like This]Items_Like_This = value
    
    [This Is Another Group]
    
    Items_Like_This = differentvalue
    
    More_Items = value[/code:3t8la607]
    
    You should be able to work the rest out through the relatively self-descriptive Construct events.
  • Firstly, your .cap is officially hard to navigate. Also, it's going to be hell if you add levels later on and want to make changes that permeate throughout all of them. You're better off including one (or multiple, for readability sake) event sheets that handle things in a more generic manner. That way if you want to make a change that affects multiple layouts, you only have to do it to the one event sheet.

    You can add event sheets not tied to any one layout by right clicking on the "event sheets" folder in the "project" bar. Then, in any layout's specific event sheet, right click and "include" the event sheet that the layout needs to use the events from. This will tidy up your event system, making it much easier to read, as well as facilitate modularity later on.

    As for your specific problem, in the properties of your civilian object, scroll down to the "container" option. "Add Object" and select PRE_shirt and PRE_hat or whatever the shirt and hat objects are called. This will tie the hat and shirt objects to each NPC individually --> multiple NPCs could have different shirts and hats, and if the controlling object (in this case, the civilian) is destroyed, so will the hat and shirt particular to him (but no others). I tested this, and it seems to be an improvement, you should be able to work out the remaining bugs from here (you'll probably have to change the flow of the events so that it takes this into account)... Still, if you have any further problems, shouldn't be too hard to fix.

    Your game looks pretty cool, at any rate. Good luck with it.

    Edit: I just worked out what one of the causes of a bug would be. Whenever you create a shirt or hat object, it also creates a civilian (because a container object is also contained by the object it is containing?). My suggestion is to not create the hat and shirt objects, but rather run the events that change their appearance on the creation of the civilian its-self. There are some complex problems associated with containers, and I fear you'll have to modify quite a bit to utilise them. Which is why generic event sheets are awesome!

  • Second on the list from Aus.

  • Why don't you just use particles, and have the x, and y randomizer set to screen width, and screen height?

    I guess it would depend on what you'd want to do with the explosions. If you wanted them to, say, interact with other objects in the game, particles wouldn't cut it. Also, I don't believe particles can have animations.

    Edit:

    This is probably more efficient. Still, add the scroll offset as Stargoat (lol) said.

    What's funny?

  • An alternate (and, in my opinion, better) method to have them occur within the bounds of the current screen is to use...

    + System: Every 3000 milliseconds
    -> System: Create object Sprite on layer 1 at (ScrollXLeft+Random(1024), ScrollYTop+Random(768))
    [/code:1ag7n1xa]
    
    This will make sure the objects only spawn within the bounds of the screen. Lost My Keys' method will work, but it's not as efficient, and much less so as the layout gets larger. (Plus, there's no guarantee that the objects will actually spawn on the player's screen).
    
    The "create object" command is found in system, and "ScrollXLeft" and "ScrollYTop" are also found in the "system" properties.
    
    Edit: For a more pleasing effect where each explosion is also randomly offset in time, try something like... [code:1ag7n1xa]+ System: Every 2000 +Random(1000) milliseconds
    -> yada yada[/code:1ag7n1xa]
    
    This will have each explosion go off at not only a random part of the screen, but also a slightly random time.
  • > How do you get more than one frame in Construct?

    >

    If by "frame" you mean "layout" then you right-click on the Layout folder in the Project bar and select "Add layout."

    The topic is clearly about animations.