Ashley's Recent Forum Activity

  • Have you tried one of the tutorials? http://www.scirra.com/tutorials

    Making an event to add text when pushing a button is very simple. I'm sure you'll get it after a tutorial. Also, Newline is in fact an expression you can use when dealing with strings. Did you try it? It's also listed in the system object expressions, which you can browse by double-clicking the system object icon at the bottom when entering an expression. You'd use it like this: "Text on first line" & Newline & "Text on second line"

  • Could you rephrase your question so it's a little more clear what you're asking?

    By the way, the correct syntax for a global variable is: Global('Lives')

  • You do not have permission to view this post

  • You do not have permission to view this post

  • I think you should read the wiki article on Conditions, it should help clear things up for you. The details may be confusing at first, but Construct actually has well-defined behavior in most situations involving object instances and object types.

    Does the "Cruiser" in "Create object Asteroid at Cruiser.X, Cruiser.Y)" refer to all cruisers, or the first/last one that was spawned?

    From the article:

    [quote:2nykc8o4]The Expression rule

    The expression Object.X will retrieve the X co-ordinate of the first instance of Object that is picked. If Object is unreferenced in the event, it refers simply to the first instance to retrieve the value. This is worth bearing in mind. See the examples for more information.

    (remember 'set X to .X + 1' will move all instances to the right because expressions which refer to the object owning the action refer to each object separately)

    [quote:2nykc8o4]A System:Destroy command for a given object destroys all instances, unless it is immediately after a spawn action that created a specific instance.

    That's right, the create and spawn actions pick the object created, and that is intended, so you can use events to modify that object.

    [quote:2nykc8o4]In other words, if I want the player to fly around in a spaceship, and the enemies to fly around in the same spaceship, would I want to create two separate Construct objects?

    Yes, but mainly because they are logically separate objects. The player spaceship is controlled by the player rather than AI and that's enough to justify making them separate.

  • Do you mean the pixel shader effects? Just apply them one by one, and see what it does. Some blending ones might make the text disappear though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not before Construct 2, and even then not before all the more prevalent platforms are covered.

  • Yes, when you're spawning an object of the same type. If you spawn an object of a different type, it can be picked.

  • That 'Copy event as text' glitch is fixed in 0.99.7 btw.

  • It was kind of an experimental feature, I'm not sure it works 100% with all the different ways events pick objects. Try it; if it works it works, if it doesn't it doesn't. I doubt it'll be fixed before Construct 2, it's deep in the engine stuff.

  • Crash=bug, so make sure that's reported.

    As for the spawning problem, this is an extremely interesting .cap. I have investigated it and at first there seems to be a problem with the timer behavior. If you replace the timer behavior with a simple "Every 500 ms" condition, the interesting stuff starts happening.

    It looks like the initial object moving to the right incorrectly keeps resetting its fade behavior, while the objects it's spawning also don't get a fade in. But it is actually working correctly!

    Let's go back to what Spawn Object does in terms of picking. Say you have an object called A, and in an event which picks A1, it spawns A2. Should you get A1 and A2 picked, or just A2? The code is supposed to pick A2 only since it's the only new created object (the system create object action works this way). This way you can control A1 by actions before the spawn action, and control A2 with actions after the spawn action.

    In this particular case though, you end up with just A1 picked - spawning an object does not pick it and the actions affect the original object! This means the 'Set angle to .angle+90' and 'set type to 2' apply to the object moving horizontally. So it ends up redirecting itself downwards, and spawning another object to continue its current path. It's kind of backwards and crazy, but it's actually necessary. If you spawn an object of the same type as the object spawning, the new object cannot be picked because of limitations in the engine. The reason is very complicated, but the code behind running a general action is:

    For each currently picked instance 'Obj':

    -> Run action for instance 'Obj'

    So for example 'Set X to 0' runs the 'set X' action for every picked instance. However, in the 'spawn object' action, it would modify the list of currently picked instances, which it is currently processing in a for-each. This can cause a crash, so the fix was to prevent spawning an object of the same type from picking the spawned object. This results in the counterintuitive behavior in your example .cap.

    The fix? I don't know what the best thing to do is; this picking behavior probably can't be changed in the 0.x engine because it's so integral to the running of actions. I think the best thing to do is to always spawn a different object type (even if it looks the same). So you could have RedBulletA spawning RedBulletB which in turn spawns RedBulletA again. You can then use families to save repeating events. Hopefully that will do you for now.

  • You do not have permission to view this post

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,447,540 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x109
    Coach One of your tutorials has over 1,000 readers
  • x63
    Educator One of your tutorials has over 10,000 readers
  • x3
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x36
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs