tulamide's Forum Posts

  • Never used it before but after trying now, I see that you're right. It isn't working (as well as 'Bring to top')

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Depending on what you try to achieve, you may also want to play around with Color Fusion (Masked)

  • basically i just want to add force where ever the sprite is pointing at.

    So you just don't know how to calculate the x/y-components from an angle?

    That's what the trigonometric functions 'sin' and 'cos' are for. cos(45) returns the x-coordinate of 45? on the unit circle (value between -1 and +1), sin(45) returns the y-coordinate of 45?. Just multiply this with the strength you need.

    + MouseKeyboard: On key Up arrow pressed
    -> Sprite: Add force (cos(45) * 100, sin(45) * 100)
    [/code:7ph4ap5x]
    
    You get the angle of your object using the expression 'Get Angle' (Sprite.Angle)
    [code:7ph4ap5x]+ MouseKeyboard: On key Up arrow pressed
    -> Sprite: Add force (cos(Sprite.Angle) * 100, sin(Sprite.Angle) * 100)
    [/code:7ph4ap5x]
  • I don't know what happens (seems like python isn't aware of instances of the text object), but while looking at your cap I thought I should say this:

    It seems you want to test for the absence of the file when the game starts. There is a system condition for events that need to be executed only once at start. You just create subevents to this one, and all those will only be executed once, when the layout starts:

    + System: Start of layout

    ++ File: [negated] File "gmdat" exists

    -> call the function

  • All event sheets are executed per tick in a loop, yes. (And the python scripts also)

    This thread might help you further understanding the workflow: http://www.scirra.com/forum/viewtopic.php?f=8&t=6880&p=53876#p53876

    EDIT: Ah, and before newt hops in, I have to tell you, that in case you will never again need the textbox again but really only once, you may also use the system condition 'trigger once' instead of the variable. The advantage of the variable use is that you can set that variable to 0 again at any time to let the text create again.

  • I'm extremely confused and bewildered and on and off with Construct, so once again I have a question. Is there a way to have a function run once? I honestly assumed that they did run once (since they are functions). I may be missing something, I do not know.

    Basically, I have been trying to make a message box that would appear once and be called anytime. Basically I have an event sheet that holds the functions for the game.

    On page 1 (The layout that sets stuff up), I have this

    > File "gmdat" does not exist:
    My function: Add parameters (The parameters for the message box)
    Call function: myfunction (Forget picked objects)
    [/code:3p8a5rqj]
    
    On my page that contains the functions, one being for the message box,
    [code:3p8a5rqj]
    System: Create the Infobox object at params (3), (4) (x and y)
    System: Create a second instance of "Text" at Infobox's pivot point (Now there are only two instances of text, or there should be).
    Text: Set height to param(5)
    Text: Set width to param(6) - 30
    Text: Set text to param(7)
    [/code:3p8a5rqj]
    
    In theory, I should be able to then do this in Python:
    [code:3p8a5rqj]
    Text[1].Text = "This is a test."
    [/code:3p8a5rqj]
    ...since only one additional instance is made (I was forced to do it by the editor just to have it a global object that I can pull up anytime). The python script is in a sub event.
    
    Now here is where the problem comes in. When I put line of script in, anything above Text[0].Text did not work and gave me an error. I looked at the debugger and also saw that the game was creating an infinite amount of instances of "Infobox" and "Text".
    
    So I must ask, is there any way to have a function to run once (or is that impossible)? Also, why is the Python not grabbing other instances beyond the first?
    

    A function is executed when you call it. If you call it once, it will be executed once. Events are checked on every tick. If its condition is true, the event will be executed.

    If 'File "gmdat" does not exist:' means that you check for the absence of a file then this condition will be true on every tick unless a file "gmdat" is created.

    Tick 1: Does the file exist? No. Call function

    Tick 2: Does the file exist? Still no. Call function again

    etc.

    To prevent calling the function more than once, create a global or private variable and use it as a switch. Set it to 0 when creating, then in your 'File "gmdat" does not exist:' add the condition my variable = 0

    and add the action 'add 1 to my variable'

    Now the event will only become true the first time it is checked and the function will only be called once.

  • With C2, we're aiming to build the best game creator in the world.

    If this goal is reached I'm a customer

  • Chris,

    Is there any way you could make this app go both ways? For example, making it possible to turn animations into spritesheets that are compatible with xna? Gamemaker 8 exports spritesheets, but I'm not sure about its compatibility with C# and xna. I've just started using xna and this would be so helpful, and I know a lot of xna users that are REALLY wanting this.

    I'm not working with XNA, but isn't there already some tools?

    For example, Sprite Sheet Packer comes with an XNA exporter "which exports an XML file in XNA Content format" (quote from the description of the tool)

  • I'm having issues when running photoshop parallel. Never had distorted sprites though, but crashes that don't occur if I start the computer and use Construct without running photoshop. It wasn't enough to just exit photoshop, it needed to be not started at all.

    I mention it because there's photoshop running in your screenshot, but probably this is not related to your problem.

  • Try creating a fully animated character with CS 0.x It chokes up.Fully animated means 30-120 frames for walking swimming jumping crawling climbing fighting etc..

    Oh and the character is not a small little 16x16 pixelated can't make out what it is character.256x512 for the character. Resolutions of 1920x1080 stage sizes of 100000x100000.It's not just the animation that chokes it up it's all those factors rolled into one.

    256*512*4 = 524288 bytes per frame

    * 120 frames = 62914560 bytes per animation

    * (walking swimming jumping crawling climbing fighting) 6 = 377487360 bytes per character

    That's 360 MB only for the main char, not to speak about the HD output (always buffered, so that alone is another 16 MB), effects and all the other frame-animated assets.

    This is for sure a hardware problem and not Construct! I wish people would stop blaming Construct for misusing the hardware they have to work on

  • As far as I am aware of, the objects in a container will be created on the same layer. However, something like this should work:

    + Sprite: [negated] Sprite: Is on layer "layername"
    -> Sprite: Move to layer "layername"[/code:2gv6o1bc]
    
    When using this, the sprites will only be on the wrong layer for one tick (the one, where they are created)
  • A function name may not have spaces. Make the name being swap_values or swapvalues, etc.

  • To expand on the idea of 30 day trial:

    - All updates are lagged behind

    - After 30 days you can still use the software for personal use!

    - After 30 days though you will have to endure a program start up message.

    There we are, the end of the Reaper model...

    What message will it be?

    "You are currently playing a game that was done with a trial version that expired. Please urge the developer of this game to f...ing buy a license."

  • > But the lack of an .exe exporter means it's a no for me.

    >

    I don't think you should put a vote against the licensing model because you don't like the features - they're different things. If we did an EXE exporter, that would not change the proposed licensing model! So the question is, is it a good licensing model?

    We've been over the EXE exporter in other threads - we knew we'd disappoint many people with HTML5, but we took a risk and did it anyway, and we still want to eventually produce an EXE runtime. So hopefully everyone is happy in the end!

    But you can't seperate the license from its product. That's like saying "I can't really say what exactly I will sell you, but I want to charge 200 ? for it. Is it ok?"

    We can only say if a licensing model is a good idea for the specific product it is offered for. And without a guarantee for an .exe exporter, a robust editor, and at least the feature set of Construct 0.x, well, without all this that model is a bad idea.

    I don't mind that those features will take time until integrated, but it needs to be definitely in. And as soon as it is so, then that license model is a good idea.

    Because, apart from real Scirra fans, people will only buy a feature rich, complete (for its tasks) product.

  • In your first post you said that you are using "play music from resource", in your second you talk about magicam stopping music "on a reserved channel". XAudio2 knows music and sound - music is played directly (and parallel to the sound channels) and sound can be played on channels. And only for the latter you may reserve channels. Also, music is never chached, while you have full control over caching sound. If it is music you are using, then it might be that room transitions block access to the harddisc and because of music not being cached, it can't be played during that time.

    I assume you're using exactly one XAudio-object set to "global". Try playing the loops as wav via channels and set a high cache value plus using "cache file" or "cache directory". Other than that, there is only the way of fixing (if it is a bug) magicam.