Can't choose "Add local variable"

Bugs will be moved here once resolved.

Post » Sun Mar 08, 2015 8:47 pm

Problem Description
____I've been trying to add local variables by right-clicking events, variables and blank spaces in the event sheet, but I'm only given the choice of "Add global variable." This happens in my current project, and in any new, blank project I set up. My current project is too large to upload, so I'm uploading a new project that has only one sprite in it. ____

Attach a Capx
____Yes. ____

Description of Capx
____ The uploaded Capx doesn't really do anything except make the sprite transparent if visible. ____

Steps to Reproduce Bug
  • Step 1: In Event Sheet, right-click any Event, variable, or blank space.
  • Step 2: In the list of choices, hover over "Add."
  • Step 3: Only "Add global variable" shows up, along with other non-variable-related choices.

Observed Result
____ Only "Add global variable" shows up as a choice. ____

Expected Result
____ I expected to have the choice of "Add local variable." ____

Affected Browsers
  • Chrome: (NO)
  • FireFox: (NO)
  • Internet Explorer: (NO)

Operating System and Service Pack
____ Windows 8.1, HP Pavilion 500-314 (Couldn't find any info about service pack.) ____

Construct 2 Version ID
____Release 195 (64 bit) ____
You do not have the required permissions to view the files attached to this post.
Posts: 24
Reputation: 691

Post » Sun Mar 08, 2015 8:56 pm

It's not working like that, you can't make variables by right clicking on events.
For global variables you need to click on empty space and create a variable. If you want to make it local, then you need to move it manually into it's place.


You can use keyboard shortcut "V" to create variables - and this method will create a variable (local or global) depends where you use it. If you press "V" on a sub-event or an event inside a group then it will make local variable automatically, else it will make global variable.
Posts: 2,611
Reputation: 36,844

Post » Sun Mar 08, 2015 9:07 pm

Thanks, shinkan! For some reason I couldn't see that information in the tutorials or manual, but I probably overlooked it. I suspected it probably wasn't a bug, but I wanted to be sure. Thanks again. :)
Posts: 24
Reputation: 691

Post » Mon Mar 09, 2015 2:13 pm

Top-level variables are always global. Variables in sub-events are always local. Since your .capx only has top-level events and no sub-events, you can only add global variables. Add a sub-event and right-click in the sub-event margin and there's the option to add a local variable. Closing as not a bug.
Scirra Founder
Posts: 25,198
Reputation: 200,337

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests