lionz's Forum Posts

  • Don't worry about not getting a response on here as the forums are really quiet now as compared to some years ago. You could try the community discord as there is a promotional section in there.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nice idea but I think it only works for text and I'm looking to replace with a number to do some calculations, point of this is to use a value which can be altered any time during gameplay such as a damage amount. Do you know if something similar is possible with numbers?

    edit: I guess I can do calculations then use replace with str(variable), bit fiddly but it may work

  • I'm looking to set a description on a card from data in an array that contains a variable, something like 'Deal card.damage damage'. Does anyone know a decent way of creating this where the variable appears in the middle of the text?

    I know of a way where I can set it on the card itself of course, like set description to "Deal"&variable&"damage" but I'd like to use one event for all cards where I can pull data from an array that includes the variables, if anyone has any ideas...

  • Maybe you could create the 3 digit code in advance, or 3 separate variables, then when you click the sprite it sets the animation based on variable. You didn't tell us enough about the code idea so I can't tell if that's useful.

  • You can use a trigger once to run the attack one time. To stop it from chasing you can disable its bullet behaviour or alter speed.

  • Delete the loop and replace all loopindex with questionnumber variable.

  • As I recall I made that file so send the new one and tell me what you need it to do, when the questions change etc

  • Not sure what you were trying to achieve here, if you have a loop that runs the function until the end then it would only show the question and answers from the last entry of the loop. Maybe you should be using a variable instead of loopindex to grab all the data for the first set of questions? Then the next question you would add 1 to the variable to get the next row.

  • Add a short wait before you set bullet enabled in that function. Also you can't just set position of that thing? you must destroy and create a new one each time?

  • There's no loop

  • If you mean that inside the function there are actions to apply to object with the string flee then you can use conditions inside the function object.string=flee to pick the right one.

    If you are calling the function in an action from the object with string flee and you want to pick the same one then you can send the objects UID through the function as a parameter, then inside the function you can pick object where UID = parameter to ensure it is the same instance.

  • When you find the target you should then apply effects in the same action, you can use one tidy function that applies status X from attacker X to target X, you can send both through the function as parameters. Sending UID through ensures you are picking the right target and it shows up in logging, it's good for minimizing bugs and gives you some control within the loops.

  • Is this because you are using a for each for the attack and then a for each for the status effect underneath? I guess it wouldn't find the instance if it was destroyed before the second event, but you could have them as one event. Status effect can be a function, you can pass the UID of the player through it so you know it is being applied to correct instance and if it was destroyed then function wouldn't do anything.

  • Ok I think I understand the problem you're describing but the point of the for each is to run through each instance to check which ones match the conditions and you can pick them, saying they must be 0 and 1 doesn't make a ton of sense. What are you trying to achieve with the loop or what data are you unable to gather?

  • If I'm understanding it correctly you need descending from high to low?