SAAj's Forum Posts

  • A simple top-down shooter that emphasizes maneuvering rather than aiming. I'm using Turret behavior to auto-aim so that the player can focus on lining up a good shot, and RTS behavior to move the player. The target is using Ball behavior with Random(90) bounce, and is chased by an ally exhibiting Ball behavior, with a command telling it to always auto-rotate toward the target. The presence of your ally keeps you from simply spamming bullets until you kill your target, since hitting your ally will kill him. I feel that this accurately portrays certain nuances of tactical ranged combat that many such games do not place enough emphasis on.

    Any and all feedback is welcome. Please let me know what y'all think.

    http://www.mediafire.com/?560zxugf0v9jhx5

    edit: switched link from rapidshare to mediafire

  • I wasn't sure where to post this, so I figured this would be the safest bet. Where would I post if I was looking to collaborate on a project? Not a lot of people on moddb, gamedev, etc. seem to be familiar with Construct, unfortunately.

  • It's true, there isn't a specific Add Height/Width action. Just use Set Width/Height and write something like

    Object.Width + 40

    to add to the exisiting width.

    Thanks, that was the command I was looking for, just couldn't find it. Is there somewhere I can look up a list of commands such as this? I'm sure I'll need to reference something similar.

  • I've scoured the forums and wiki, and I can't find anything that specifically states how to tell the Event Sheet Editor to add x pixels to the height or width of an object when an event occurs. As far as I can tell, there's no option to specifically do so. I'm looking for a way to add or subtract, rather than set, a value the way I can with private variables. I assumed the command was Add(x) or +x or something, but neither of those work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That solved the problem; thanks again!

  • While I appreciate the time you took to elaborate about the problem at hand, it's really hard to come up with any kind of solution without seeing the corresponding cap file. So I'd indeed suggest you upload it. I would recommend to get Dropbox, which quickly has become the standard around here for sharing files. It's fast and very easy to use!

    I opened it in debug mode; seems like the private variables aren't subtracting. Thanks for the Dropbox suggestion; I can see why it's so popular. Here's the .cap: http://dl.dropbox.com/u/16313158/Gears%20of%20Car.cap

  • I toyed around with the generator and decided that, for my purposes, it was indeed much easier to simply use 1 sprite and assign each rollable object its own animation and private variables. The application I'm trying to create is a 'challenge' screen for a racing RPG; the player and opponent randomly draw a vehicle each, followed by the player choosing the race type the vehicles should participate in. Each vehicle has 3 private variables denoting its proficiency in the race types, and there are 3 'subtract' buttons, one for each race type. These buttons are set to subtract 1 from their respective private variable from both the player and opponent; when one of the two reaches 0, that object is destroyed and the button is disabled, declaring the remaining vehicle the winner.

    Ideally, the player should open the application, roll the vehicles, and click on the desired race type repeatedly until one vehicle is destroyed. However, I'm running into an odd problem. I set the global variables 'RollPlayer' and 'RollOpponent' to Random(2), as well as assigning new animations to the Player and Opponent objects based on their respective global variables (0=Ford Fusion & its private variables, 1=Ford Flex & its private variables). For some reason, the subtract buttons usually don't work after I've rolled the vehicles. They work just fine beforehand (the default animation has all 3 private variables set to 2, so 2 clicks of any button will destroy both of them), but usually refuse to respond after the vehicles are rolled. I'm not sure if they're not subtracting, not destroying when they are equal to or less than zero, or something else altogether.

    I've got the private variables 'RollPlayer' and 'RollOpponent' set to -1 initially, and I tried assigning all the commands to key presses instead of buttons. I'm still getting the same problem. If it would help, I can upload the .cap file, though I've never really uploaded anything other than pictures/videos, and have no idea what services to use.

  • I assume that you know that actions directly after a create/spawn action will pick the newly created object. But I believe the problem here is that you're creating the object by name.

    If possible you should use just different frames (for static objects) instead of different sprites. Or if it needs to be animated, use different animations. That would make your life a whole lot easier. But might not be feasible depending on what your sprites need to be able to do.

    So in case you absolutely need to have different sprites, always remember what Ashley said back in 2009:

    [quote:1gw3vesw]The way it is, though, is that when you create an object, it doesn't really exist until the end of the next top level event or trigger. (A top level event is anything which is not a subevent of anything else - I can't remember if events in groups of events count)

    Always keep that in mind when you're trying to manipulate newly created objects.

    So in this case, if you have an object created by name and want to assign a certain PV to it, you could do it similar to this:

    http://dl.dropbox.com/u/2306601/Rollit.cap

    I'm making use of a family and a set the PV to be changed to a negative initial value to indicate that it hasn't been changed yet.

    What's also important is that you shouldn't use Button objects for creation events, since they're messing with the newly created object in a way that changes applied to it will appear one tick too late. That's the best I can explain it right now, there's a comment in the cap which should make it clearer.

    Also let me mention that there is a Python-method to safely pick newly created objects. But I'm not much of a Python-user and can't recall it right now. A forum search should come up with it or somebody else will be so kind to repost it here.

    Thanks for taking the time; I'm still trying to fully grasp it, but the .cap is very helpful, as is your explanation.

  • Disclaimer: I've searched the FAQ, tutorials, documentation, and this forum trying to find a solution to this problem, but I don't know exactly what to call it or where to look. I'm sure it's here, I'm just new to scripting/coding and thus unfamiliar with the jargon.

    The situation: I've got a 'roll' button that randomly generates a number between 1 and 20 when clicked. Each number corresponds to 1 of 20 sprites; when a sprite's number is rolled, it is generated. I've also got a 'test' button that subtracts from the generated sprite's private variables.

    My question: how do I get the 'test' button to subtract from the private variables of the generated sprite without it knowing in advance which sprite it will be? Do I create some sort of 'placeholder' sprite that mimics the private variables of the generated sprite, and tell the test button to always subtract from the placeholder? If not, how do I tell the test button which sprite to subtract from?