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 - froz

Pages: 1 ... 13 14 15 16 17
211
Ask a Question / Why can direction of self be over 360?
« on: June 16, 2012, 02:48:29 pm »
Hi there,

the subject says it all. I don't understand why the direction of an actor is not like any other angle, told with a number of degrees from -180 to 180, but instead it appears in can be any number. For example if I turn my actor in game clockwise, after reaching 180 it won't switch to -179, but it will be 181. Later it can be over 360 and more. It's really frustrating and I wish I would notice it earlier. Any reason why it works like this?

Is there any better workaround to get direction degrees in range of (almost) -180 to 180 then get reminder of direction/360 and check if it's more then 180, if it is, decrement it by 360?

Thanks for help.

212
Resolved Questions / Re: [SOLVED kind of] Spawning actor by itself
« on: June 16, 2012, 12:39:14 pm »
Well, in theory recycled actors should make the game perform better, at least when you are creating many of them (like bullets). However in my game I checked it and didn't see any performance difference and I have to know if an actor is killed, so I just used normal actors. Also I've seen some people saying strange things happen with recycled actors and I'm not sure if they are fully reliable.

213
Ask a Question / Re: Inventory/Bag for rpg
« on: June 16, 2012, 11:07:17 am »
Ah, ok, nevermind then. You got me worried for a moment :).

214
Ask a Question / Re: performance
« on: June 16, 2012, 11:04:11 am »
Yes, ofcourse. I didn't mean that performance is affected only by the number of actors. Just that only what happens in the screen that is played matters, not other screens, because code from other screens is not run at the time, actors do not exist (yet) etc. Or am I wrong?


Edit: and ofcourse I meant scenes when I wrote screens :).

215
Ask a Question / Re: Inventory/Bag for rpg
« on: June 16, 2012, 10:28:04 am »
Why? I'm using list with actors all the time. I can't imagine my game without it, unless I would create sophisticated workaround for each case. Is there any reason why I shouldn't put actors into lists (I'm not talking about game attributes here, so saving is not an issue)?

216
Ask a Question / Re: performance
« on: June 16, 2012, 10:25:34 am »
From what I understand, you don't have to worry about other scenes, performance is only affected by actors that are in the scene that is currently playing. So - many scenes with 10 actors in each are fine and should run smooth.

217
Resolved Questions / Re: [SOLVED kind of] Spawning actor by itself
« on: June 16, 2012, 10:15:59 am »
Block "if actor is alive" literally means if he is alive. If he is recycled, not killed, then he is alive (just hidden). There should be a block "if actor is not recycled" to use for recycled actors. Actually I believe you can do that in code and it shouldn't be too hard, but as I never coded anything, I'm in no position to tell how exactly to do that.

218
Resolved Questions / Re: Help with my collision problems?
« on: June 15, 2012, 04:49:32 pm »
Quote
"collision works" doesn't come up on the screen.
Ok, then you can be sure now that the event when collides doesn't start. I would first check if the attribute "block 47" and similar really hold actors they are suppose to hold.

Quote
Because I need the explosion actor to spawn in front of the red blocks but when I did it in side of the actors themselves I couldn't get a actor to spawn in front of them.
You have an option for that in the create actor block. At the end, choose "front". If that doesn't work, I guess you could create a new layer for explosions and after creating explosion actor, change it's layer to the new layer. Ofcourse the new layer should be on top of the layer with blocks.

219
Resolved Questions / Re: Help with my collision problems?
« on: June 15, 2012, 04:21:08 pm »
Well, then first go in palette to flow>debug. You can find "print" block there. Just put it inside the collision event you want to test and enter any text in the field of that block. It will later show up in the console when it's triggered.

For example, if you put "print: this collision worked" inside an event "when Red block 47 hits laser beam 2". Then test the scene, open console (to do this, press the key: ` it's under escape, to the left of key 1). When the collision between red block 47 and laser beam 2 happens, you should see text "this collision worked" shown in console. If not, then for some reason this collision doesn't work.

Also if you have any error shown in the console, that's probably the reason why everything doesn't work.

By the way, why don't you just use "when self collides with something", but insist on having several different "when collide" events in your scene behaviour? It doesn't seem to be needed, you can do that code in the actor (block) behaviour.

220
Resolved Questions / Re: Help with my collision problems?
« on: June 15, 2012, 03:59:31 pm »
I'm sorry if I will post something obvious, but do you have physics turned on for each actor that you want to collide? It won't work with physics disabled. Also check collision shapes. Use print block to check if the collision really happens when it should. If not, then it's not behaviour, it's something in your settings. BTW when collide event should really work the same, no matter if you use actor type or actor group one.

You can also add debug behaviour (it's pre-shipped) to the scene. Among other things, it will show all collision shapes on screen when you play the game.

221
Chit-Chat / Re: A new arcade has opened it doors!
« on: June 15, 2012, 02:43:51 pm »
What are your posts for? They aren't interactive and they certainly can't win anything.

Come on, if he wanted to do it, why do you have to be so critical about it.

222
Ask a Question / Re: chasing missle
« on: June 15, 2012, 12:02:54 pm »
Yes, there is. Use event "when mouse clicked" and inside it make loop "for any actor on screen" and inside that loop you can check if that actor was clicked and set your target to it. Note however that every actor is literally every actor, including missiles etc. So you may want to limit it to any actor of group or type.

223
Archives / Re: Make Block Transparent When Dragging
« on: June 14, 2012, 05:16:42 am »
I would actually like it if every block had some kind of targetting part (only when dragged), sort of a needle that you would point to the place you want the block to go to. With long blocks and few free places it's sometimes not possible to snap them in the place you want to. Sometimes they will go to place that is below their left edge, sometimes it's right edge and sometimes it's middle...

224
Ask a Question / Re: chasing missle
« on: June 14, 2012, 03:45:16 am »
You don't need a game attribute. I have just discovered that my Stencyl installation was corrupted by yesterday's crash, so I can't help you right now, but if you show what you already have, I'm sure someone here will be able to help you.

225
One more bug report. When 2 plants are close to each other, one under the another, when you hit the lower plant first, then you can hit the other plant from bottom. If that happen, the collision event is triggered not once, but for every tick when the drip is on the leaf. It wouldn't matter much if not the sound - it's started every tick, which doesn't sound nice :).

Pages: 1 ... 13 14 15 16 17