MY SUGGESTIONS THREAD

Discussion and feedback on Construct 2

Post » Sat Mar 31, 2012 7:34 pm

Yes, because both subevents are consecutively true.
Consider logged = 0
Your first subevent happens and so sets logged to 1.

Than right away, you test if logged = 1. It is, since you changed it in the previous subevent.
So it switches back to 0.

What you need is to add a global and/or local variable.
You test it along the value of logged.
Something like :
Logged = 0
Var = 0
-> Set var = 1
-> Set logged = 1

Logged = 1
Var = 0
-> Set var = 1
-> Set logged = 0

This way, you are sure that if a subevent was already ran, the second won't be running as var won't be equal to 0.

You also have a conditionnal expression
On button clicked
-> set logged "logged=0?1:0"
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Mon Apr 02, 2012 9:25 pm

If four sprite objects ALL use the same image, then why is the same image found duplicated 4 times in the images folder??

This is strange.

In normal html i can create many different divs or image elements which all use the same image from a single image file.

B
7
S
1
Posts: 65
Reputation: 821

Post » Mon Apr 02, 2012 9:35 pm

@rafhelp: If you use four different sprite objects, they'll use four different set of images.
So if you're reusing the same image, prefer using instances rather than making new sprites.

Take a really deep look at the manual. I think before suggesting things, you should learn to use the software the way it is intended to be used.
And once you'll do, you'll see it's pretty cleverly designed and covers most of what you need.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Mon Apr 02, 2012 9:46 pm

I would find it useful to be able to use same image paths for different objects. Most of the time I would need this for spritefont plugin and when I anchor something to the left and a clone object to the right. I also often use invisible objects to control things and these are usually 32x32 red or black boxes. After I export I have lot of useless cpies of my images. With some effort I think I could manually change them in offline.appcache.
B
40
S
5
G
5
Posts: 405
Reputation: 5,657

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests