Danming's Forum Posts

  • 6 posts
  • Good afternoon, everyone. Does anyone have an example of an open-source project (or a video on YouTube) in Construct 3 where the online functionality is implemented using a script rather than the event system?

  • Thanks for looking at my code. I think you're right, and I really should look into using hierarchies (to be honest, I hadn't paid much attention to them before).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • drive.google.com/file/d/1pe18O5YcZy5hOwnLuo8oUZSI-ejh0Et1/view

    Sorry, I forgot to make the file available. Does the link work now?

  • drive.google.com/file/d/1pe18O5YcZy5hOwnLuo8oUZSI-ejh0Et1/view

    Thank you so much for the advice. I think I really should have sent the file right away, since there’s nothing in it worth hiding.

  • I'm creating a versatile module for the GUI (so I can quickly create buttons and other GUI elements for future projects).

    const childInstanceSizeList = {}
     for(const instanceObject of childInstanceList){
     childInstanceSizeList[instanceObject] = [];
     if(instanceObject.instVars && instanceObject.instVars.isText){
     childInstanceSizeList[instanceObject].push({x: instanceObject.width / instanceObject.textWidth, y: instanceObject.height / instanceObject.textHeight})
     } else { 
     childInstanceSizeList[instanceObject].push({x: instanceObject.width / instanceObject.imageWidth, y: instanceObject.height / instanceObject.imageHeight})
     }
    
    //next
    
    for(const instanceObject of childInstanceList){
     const originalScale = childInstanceSizeList[instanceObject][0];
     instanceObject.behaviors.Tween.startTween("scale", [originalScale.x + 0.2, originalScale.y + 0.2], 0.1, "in-out-sine")
     }
    
    for(const instanceObject of childInstanceList){
     const originalScale = childInstanceSizeList[instanceObject][0];
     instanceObject.behaviors.Tween.startTween("scale", [originalScale.x, originalScale.y], 0.1, "in-out-sine")
     if(instanceObject.instVars && instanceObject.instVars.isText){
     console.log("Original scale:")
     console.log(instanceObject.height / instanceObject.textHeight)
     }
     }
    
    

    For some reason, every time I press the button, the scale gets smaller.

    Tagged:

  • 6 posts