else's Forum Posts

  • Ah, thanks so much! That looks perfect.

  • Ah, sorry, I meant the delay before they fire their next projectile, not the speed of the projectile.

    At the moment I have something like this:

    Enemy > Has line of sight

    System > Every Random(1,5) Seconds >>> Enemy > Fire Projectile

    The problem is that I can't seem to get each separate enemy instance to fire at a different random rate.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This one is kind of embarrassing because I'm certain I should be able to do it myself by now but I'm finding it difficult. All I want to do is set each instance of an enemy to fire when certain conditions are met (line of sight to player, is on-screen, is visible etc) at a randomly determined rate and have this rate change after each shot. Currently, it seems I can't do this without all instances firing at the same rate, even when I try setting that rate as an instance variable.

    Can anyone help or point me at a relevant tutorial?

    Many thanks in advance.

  • Thanks very much! That works perfectly.

  • I'm using the 'scroll to' screenshake, centred on the player, for a number of different events but it won't play when the player is at the bottom of the level (levels are mostly designed vertically). I understand that if I set scrolling to unbounded this would solve the problem but I don't really want to do that because when the player is at the base of the level, or against one of the sides, they need to see into the level, rather than be in the centre of the screen, for gameplay purposes.

    Is there a way I can toggle bounded/unbounded scrolling, or get the screenshake to work without unbounded scrolling?

  • Thanks! That does the trick nicely.

  • I'm making a platformer and I have a switch which toggles between two worlds (yes, it's for Ludum Dare!), each of which has platforms in different positions. Currently, I have it set so that when the switch is toggled, the platforms from the old world turn invisible and their solid behaviour is disabled. This works fine to an extent - if you now try to jump on one, you can't - but if you are already standing on one then you don't fall down as I'd like. The platform vanishes but continues to hold you up. What can I do to fix this? I don't want to have separate layouts for the two worlds because that seems to cause a lot of problems with keeping many sprites global.

    Thanks in advance!

  • Ah! Thanks very much.

  • I have a number of pages (varying on each level) which will each contain a block of randomly generated text to read when you click on that page. I now have it so that the text generation works fine but I would really like to be able to store the text, once it has been generated, as an instance variable of that particular page, so that clicking on the same page will always bring up the same bit of text. However, it seems that I can't set the text box to display text that is held as an instance variable, only a global variable. Is there a way round this?

  • Ack! Sorry about this - I just checked through and found I'd missed out a couple of keys (I have loads in each dictionary) and hadn't picked up on them the first time I checked. My fault entirely, everything is working fine now.

  • Sorry to keep resurrecting this thread but this sort of follows on from the problems I had before.

    Everything is now working fine except the dictionaries sometimes return a result of 0 and I'm not sure why. For example, I have a dictionary called 'Jobs' with keys from 1 to 6 containing job names as values and set text from it like this:

    Jobs.Get(str(round(random(1,6))))

    All of the possible jobs will sometimes appear as text but I also sometimes get a 0. This happens with other dictionaries too.

  • Thanks both very much. Nimos100 - that makes a lot of sense and I feel slightly embarrassed for not figuring it out myself! Whiteclaws - the array method is very elegant and I'll certainly make use of it (also, a tip of the hat for spotting me! Hope all is well with you ).

  • I'm having a little trouble with this again. I now want to store different instances of randomly generated text permanently.

    I have a number of floating pages and when clicked on I'd like them to display a block of randomly chosen text (which I can now do thanks to the advice received above) but I'd then like that page to store the text which has been generated (as an instance variable?) so that from now on that particular page will always display the same thing when clicked on.

    What's the easiest way to do this?

  • Ah, thank you - I forgot the quotes.

    That will be very useful because there are times when I want long lists of variables which will be used frequently (so a dictionary is perfect) and times when I want just a few options for variety in one particular piece of dialogue (so the choose method will be best).

    Thanks again to both of you - this is just about the most helpful and supportive forum I know.

  • Works perfectly! Thanks very much - greatly appreciated.