Yttermayn's Forum Posts

  • 2) Are you saying that a function object can hold many functions, so you need to refer to a specific function inside the function object? That makes sense, if that's the case.

    What then delineates one function from another inside that function object when viewing them from an event sheet?

  • dsarchy and shinkan:

    1) What you said makes sense, I'll try that. Thank you both.

    2) I am still confused after reading your replies to number 2 several times. Unfortunately, your examples you've supplied are both from version 117 and the free 114 version I have will not load them.

    Are you saying that the function object has a name, but it needs to be referred to by yet another name? This doesn't make sense to me.

  • After reading th manual, which was good at explaining what a function does, but not how to actually make one, I found this thread:

    scirra.com/forum/function-object-vs-function-plugin_topic59653.html That got me further to where I have a working function.

    However, I have other questions:

    1) Can a function be on a different event sheet (for organizational purposes)? I tried just making another event sheet and put my function there, but that didn't work.

    If the functions can't be put on a different event sheet, is there some way to put them 'out of the way' so that the event sheet isn't a mess when your scripting starts getting massive?

    2) When I created my function object, I called it 'OrbitCalc' But then I was asked to name it again in a window called "Parameters for Orbitcalc: On Function", with explanation text of "The name of the function that is being called." and a field labeled "Name". Didn't I name it 'OrbitCacl'? What is this extra bit of information for? I found that if the calling event (which also asks for this info) and the "Name" don't match, the function won't run. I don't understand what the extra step is for.

  • Matt75: How do you 'pin' an object to another object?

  • I figured out how to do this using the circle plot formula.

    NewX = OrbitDistance * cos(DegreesAngle) + OrbitCenterX

    and

    NewY = OrbitDistance * sin(DegreesAngle) + OrbitCenterY

    Where NewX and NewY are the X,Y coordinates of where your ship is going to be, DegreesAngle is what angle off of the space station you're calculating for, and OrbitCenterX and OrbitCenterY are the center coordinates of your space station, aka. the thing your ship is orbiting.

    If you keep incrementing DegreesAngle every tick, and assigning your shiup objects X and Y position to NewX and NewY, it will orbit in a circle around the space station at a range (radius) of OrbitDistance.

    Playing with how much DegreesAngle is incremented will adjust the speed, and you can even decrement it into the negatives to reverse the direction or orbit.

    You should probably put in a conditional statement that makes DegreesAngle wrap around from 360 to 0 or vise-versa depending on the direction of orbit. Otherwise, when the variable you are storing DegreesAngle in reaches its maximum value and wraps around, the ship will 'jump' to a different position in it's orbit suddenly. This might never come up depending on what size variables C2 uses. I don't know, I'm still learning the system.

    Anyways, here is an example from something I'm working on.

    dl.dropbox.com/u/142115313/SimpleSpace/index.html

  • Great, you're awesome, and thank you.

  • Thanks, theubie. Have you tried exporting your project to android? Is it complex? If so, hows the framerate? I ran into trouble in 001 and with no way to build for android (yet), I couldn't really test it out when I started becoming concerned about framerate during AI development.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, I'm changing the question a little. I got it to tile this time. Not sure what I was doing wrong the first few times. Anyways, my roguelike will require changing the image displayed by individual tiles, as well as holding some variables. Will tiled backgrounds work for this, or should I just go with sprites?

  • I'm interested in making a roguelike in C2. I already did quite a lot of work on 001 engine, with a fully functional procedural dungeon generator and a partially finished custom AI. For C2, I found an example of an isometric map generated at runtime using a sprite object as a tile. I was thinking of using this method, but I don't want to overlook any advantages gained by using the 'tiled background' object. Trouble is after reading the manual entry for 'tile background', I'm no closer to understanding how it produces a background from a single tile image. I tried making one, but it just sits there as a single tile. Someone please help me understand this object.