### Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

### Messages - Future Freak

Pages: 1 2 3 ... 18
1
##### Paid Work / Re: Interpolation with Bezier Curves demo.
« on: March 24, 2014, 01:05:28 am »
I've been away from Stencyl for a while, due to other commitments, but am planning to get back to it soon. I'll try and get this demo code on forge as-is in a few days when I get back home onto a computer.

2
##### Ask a Question / Re: actor waking on a osscilating rope
« on: October 20, 2013, 03:16:19 am »
The polite thing to do would be to add a short explanation of your solution, in case anyone else would like to know how in the future.

3
##### Resolved Questions / Re: Strange casting issue
« on: October 17, 2013, 01:10:06 pm »
Try defining XY as Array<Float> and see if that works.

Excellent - this has fixed it and explained the weirdness.

4
##### Resolved Questions / Re: Strange casting issue
« on: October 17, 2013, 08:15:11 am »
I see Std.int so is this Stencyl 2 or 3?

I'm using version 3, but that bit of code may have been cut and paste from an old project.

5
##### Resolved Questions / Re: Strange casting issue
« on: October 17, 2013, 07:23:47 am »
Ints are whole numbers and floats are numbers with a decimal place in them.

6
##### Resolved Questions / Strange casting issue [solved]
« on: October 17, 2013, 01:28:11 am »
I'm trying some simple dragging along a line code
Code: [Select]
`var vx, vy, vx1, vy1, x1, y1, x2, y2, mag, px, py :Float; var XY = ( getGameAttribute("CoOrds")[0]).split(",");x1 = XY[Std.int(0)];y1 = XY[Std.int(1)];var XY = ( getGameAttribute("CoOrds")[1]).split(",");x2 = XY[Std.int(0)];y2 = XY[Std.int(1)];vx = x2 - x1;vy = y2 - y1;mag = Math.sqrt(vx*vx + vy*vy);vx = (vx / mag);vy = (vy / mag);`
on the last 2 lines it complains and says: "Float should be Int"

however - if I assign the vx/mag to a new variable: e.g. vx1 (which is also a float)

Code: [Select]
`vx1 = (vx / mag);vy1 = (vy / mag);`
it works perfectly.

Now, this is a work around - but I'd love it if someone could explain to me what's going wrong when I try to assign a value to a variable when dividing itself.

7
##### Ask a Question / Re: Game Attribute working in Flash, (seemingly) arbitrarily changing in iOS
« on: September 02, 2013, 02:33:57 pm »
The reason I ask is because at a point in my game dev - I had my player, collectables and enemies.

When levels were half built - I would sometimes not have added any enemies yet (only player and collectables) and the player would then die when hitting basic floor tiles. Adding an enemy somehow fixed the collision detection. So something, somewhere was a bit screwed with the collision groups either in my setup - or the core code.  This, in the end, wasn't an issue for this game - as I always have at least one enemy in the scene.

I thought I'd mention it in case this was the cause of your problem. Thread is here: http://community.stencyl.com/index.php/topic,8602.msg53555.html#msg53555

8
##### Ask a Question / Re: Game Attribute working in Flash, (seemingly) arbitrarily changing in iOS
« on: September 02, 2013, 01:24:21 pm »
The problem is that there ISN'T supposed to be a collision at all.  The main character is the ONLY actor in the whole scene. Literally nothing is around, so why would this event block even be triggered to begin with?

Just out of interest what happens when you add an actor of 'Enemy robot 1' to the scene? (somewhere safe away from colliding with you)

9
##### Ask a Question / Re: Game Attribute working in Flash, (seemingly) arbitrarily changing in iOS
« on: September 02, 2013, 01:10:45 pm »
A collision will generate lots of collision events - as it is still colliding every frame.

If an enemy collides with you and you 'destroy' it on collision - it may trigger several collisions before it is actually destroyed.

What you need to do is set some flag to say 'I've been hit' and then not count the next load of collisions, and then maybe reset the "I've been hit" flag after x amount of time. Kinda like when you see a character being hit and then flickering for a second or two before becoming 'hittable' again.

10
##### Ask a Question / Re: Game Attribute working in Flash, (seemingly) arbitrarily changing in iOS
« on: September 02, 2013, 12:16:18 pm »
Do you have multiple behaviours attached to a scene or actor? The order in which the behaviours are run isn't necessarily the same as the order they're shown, and I've noticed that flash and ios - they can run in a different order, which has caused me issues in my game. I.e. an init behaviour is run AFTER another behaviour has run - but only on ios (it was fine on flash)

11
##### Shared Resources / Re: How to include arbitrary data in projects (text, images, SWF)
« on: August 27, 2013, 03:00:43 pm »
I finally got this working, after a few mis-assumptions.

Maybe "2) Stick the files in to that folder." should be
2) Stick the files in to that folder. (Do not create any subdirectories - place all files in the root of the extras folder)
and maybe say that the assets/data/ HAS to be as specified.

as I was presuming the assets/data/ was a reference to the path I created in the extras folder
e.g. /extras/data/xml/level1.xml
would be referenced by nme.Assets.getText("data/xml/level1.xml")

12
##### Paid Work / Re: Looking for developer to finish my game
« on: August 27, 2013, 09:03:56 am »
remember - in a project, the last 20% takes 80% of the time.

13
##### Shared Resources / Re: How to include arbitrary data in projects (text, images, SWF)
« on: August 27, 2013, 09:00:13 am »
Cool - will test this out tonight - it will really help with my xml data - as I'm currently copying and pasting xml files into var string declarations in behaviours.

14
##### Ask a Question / Re: how to make tiles from a nice pic
« on: August 13, 2013, 11:29:36 am »
hmm, ok I think I get it. Is it true, as it appears to me searching on the net, that most tilesets seem to be not in the sizes that Stencyl uses? btw nice job on worm food!

You will find that most tile sizes will be multiples of powers of 2 - e.g. 2, 4, 8, 16, 32, 64, 128, 256 - as this is the most efficient way on computers that are based on binary.

15
##### Ask a Question / Re: how to make tiles from a nice pic
« on: August 13, 2013, 08:55:39 am »
If you want to have tiles that are 32x32 pixels wide -  an image that is 320x320 pixels will give you a tileset that is 10 tiles wide and 10 tiles high.  An image of 64x64 pixels will give you a tileset of 4 tiles (2 high and 2 wide)

Pages: 1 2 3 ... 18