[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 1582: number_format() expects parameter 1 to be double, string given
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 1582: number_format() expects parameter 1 to be double, string given
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 1582: number_format() expects parameter 1 to be double, string given
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 1582: number_format() expects parameter 1 to be double, string given
help 3 - Scirra Forums

help 3

Post your own tutorials, guides and demos.

Post » Thu May 01, 2008 2:26 pm

Assume the position in the attached .cap

2 Questions.

What did i do wrong to keep it from running ?

How do i keep the defenders & the locks pinnend on there image points towards the moving controller?

I dont want them to rotate when the controller rotates, just jump to there new positions

Ty
B
2
S
1
Reputation: 400

Post » Thu May 01, 2008 3:37 pm

Deleted inflammatory replies. Next person to be stupid enough to do so will see a 24hr ban.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Thu May 01, 2008 6:01 pm

Ash, this cap's giving me nothing but a runtime crash on both Vista SP1 and XP SP3. Is that what he meant when he asks "What did i do wrong to keep it from running?"
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Thu May 01, 2008 7:45 pm

The crash occurs because of this expression:

{"cornerdefend", "middledefend", "crossdefend", "backdefend"} at int(random(4)+1)

If you remove it, it runs again. I'll investigate this bug when I have more time.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Thu May 01, 2008 8:55 pm

Ty for the answer on my first question.

The expression worked fine in other circumstances, dont know why/how its stuck now.
Of course i could not run the .cab to test what i made.
But i hope the second question still remains ..

In de help u gave round the 2 first .caps there is still a point i worry about.
Namely,
u did not only moved the instances created on runtime, but also the original objects from what the instances are created from.
Any destroy event will also destroy the orginal objects, and at that point i will be stuck.

Can i suggest a solution, and there are more ways to solve this.

Way 1

Give objects a property called, uhh lets say "Allover"
I am sure u will come up with a better name.

An object with "Allover" set can be placed on another layout then the layout the events editor is working on, and be accessed from any event sheet editor, but only to create/spawn instances from.

This way you can make a layout, fill it with objects that will be created/spawned in an other layout by the events in the coupled event sheet editor.

At this moment layout(x) is paired to sheet editor(x)

In other words, the original objects will not be touched, they are protected.

Way 2

Create a Special layout. Call it, lets say "global layout". In the first step there will be no event sheet editor coupled to this layout. Objects placed on this layout can be accesed from any event sheet editor to spawn/create from to their coupled layouts.

Later on u can add/pair up a special event sheet editor to it. And give the objects placed on "the global layout" easy behaviours by events. Like a rotation. Like a direction to move. Like a loop that gives it a pulsing effect. Like loop that makes it visible/invisible ever x ticks.

When this object gets created/spawned it keeps that global movement at the moment of creation.

remark: their is a "global" switch un the common tab in object properties. I was hoping it makes the object accessable global, so over all layouts and there event sheet editors. But thats not what it does.

Hope u see what i mean Ashley.
B
2
S
1
Reputation: 400

Post » Thu May 01, 2008 9:01 pm

I believe you can already do exactly that. This is how I have used my own sprites between layouts. Retry everything you just said - it should work. I believe you only missed something along the way.

Object names are global as is. Even if you have to paste new instances in the layouts that contain them, they are still merely new instances of the same object maintaining all the conditions and behaviors you've set to them.
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Thu May 01, 2008 9:02 pm

If you don't want the starting objects to be affected by events which affect other objects, why not make them separate objects?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Thu May 01, 2008 9:09 pm

Ash, the first thing I can think of there is file size. I've had to rethink some of my objects due to the quality of the graphic files I use. When I make multiple same objects, the filesize skyrockets. I've found it best to creatively code around that, using specific triggers embedded in the object's variables set to manage events.
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Thu May 01, 2008 9:16 pm

Because Ashley,

i dont feel for making 2000 objects, and 2000 events to control them. Take the example of tetris. I made that for my love btw. She loves tetris, but hates it to speed up. If she playes 1 houre, she will move 2000 blocks arround by easy.

Captain ? do me a favor.

Make 2 layouts. Place an 1 object on both. See if u can acces the objects on layout 2 from out the events editor coupled to layout 1.

Its not working for me. They dont show up in the pick requesters.

Dont u guys see the benefits of a kinda of vault, a place where u can create instances from, without the orginal objects beeing in the layout ?
B
2
S
1
Reputation: 400

Post » Thu May 01, 2008 9:26 pm

um Captain ? uh you are right.

you can do this. and u are rigth that i missed "something"

*bows gracefull*
B
2
S
1
Reputation: 400

Next

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest