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

Pages: 1 2 3 »
1
Issues Help Desk / Re: Turning On A Variable Disables Character Movement
« on: February 15, 2018, 11:04:37 pm »
In the title screen of the game, I have an object containing this code in its "Create" event.

Code: [Select]
globalvar Vacuum;
Vacuum = 1;
globalvar Fuel;
Fuel = 1;;

Then in the level, following, there is another object made specifically for declaring these global variables again; except as 0.  I was told that it's better to declare global variables as 1 initially, but the way I made my game in GM, they were supposed to start at 0.

2
Issues Help Desk / Re: Turning On A Variable Disables Character Movement
« on: February 06, 2018, 03:50:42 am »
I'm bumping this to say that I've never gotten this error before, so far as I know.  Why declaring some global variables would cause it, I also don't know.

I also converted everything involving global variables (I think) to code.  Granted, it was GML, so that might not work completely.

3
Issues Help Desk / Re: Turning On A Variable Disables Character Movement
« on: January 27, 2018, 06:23:52 pm »
I'm getting this error:

Quote
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_globals.h:69:1: error: 'var' is not a template
 var<Vacuum> object_Mouth;

I wasn't sure whether "Vacuum" is supposed to be enclosed in those "greater and lesser" signs.  I've tried it other ways, but all seem to return errors.  Also, can an "If" statement in a block code function on its own in tandem with a Drag & Drop action, or do the condition and action have to be in the same code block?

Edit: For whatever reason, I'm also getting new errors about an action I placed in one object's creation event.  It is supposed to cause another object to get created at its X,Y position, but now I'm getting a message that says:

Quote
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:470:26: error: reference to 'object_Mouth' is ambiguous
     action_create_object(object_Mouth, x, y);
                          ^
In file included from SHELLmain.cpp:107:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_globals.h:69:5: note: candidates are: var object_Mouth
 var object_Mouth;

That is really odd, since so far as I know, there is only one such object.

4
Issues Help Desk / Re: Turning On A Variable Disables Character Movement
« on: January 23, 2018, 05:24:30 pm »
I'll give the first error as an example.  It's a collision event.  The first D&D item is "If globalvar Vacuum is equal to 1".  These sorts of events must specify what that "applies to"; I've selected Self.  As global variables are not confined to any one object, possibly that's what's causing the error.  At any rate, here is the error:

Quote
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectdeclarations.h:1943:17: warning: inline function 'bool enigma::OBJ_object_Pollen::myevent_collision_5_subcheck()' used but never defined [enabled by default]
     inline bool myevent_collision_5_subcheck();

5
Issues Help Desk / Re: Turning On A Variable Disables Character Movement
« on: January 20, 2018, 01:52:23 am »
Moving along, can I reference global variables with drag and drop?  It seems doing so causes errors.

6
Issues Help Desk / Re: Turning On A Variable Disables Character Movement
« on: January 18, 2018, 07:39:58 pm »
Thank you, and I think I'm making progress; that is, turning on the variable no longer stops the character from moving.

However, to finish implementing them, I want to double-check whether Enigma still adheres to GM's syntax on global variables; that is, after they're declared, can they be referenced without the word, "global"?

7
Issues Help Desk / Re: Turning On A Variable Disables Character Movement
« on: January 06, 2018, 04:12:22 pm »
Ok; so the bits involving Vacuum aren't text code, but Drag & Drop, but I can provide some things. 


I copied the text that appeared in Debug, and so here are the parts involving Vacuum.
Quote
Add dot accessed local Vacuum
Quote
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:2376:7: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
     if(action_if_variable(enigma::varaccess_Vacuum(int(self)), 1, 0))
       ^



And as to the Drag & Drop stuff in the actual game.  First for the object that has the vacuum.

In Create:
Quote
Set Vacuum to 0

In Press Q:
Quote
If Fuel is less than 16
If Vacuum is equal to 0
Set variable Vacuum to 1

In Release Q:
Quote
If Vacuum is equal to 1
Set variable Vacuum to 0


Now for the objects that get vacuumed.

In Normal Step:
Quote
If Vacuum is equal to 1. (NOTE: For the other object.)
If at position (x,y) there is an instance of object object_Suction
Start of block
Move towards point (object_Mouth.x,object_Mouth.y)
End of block
Else
Start moving in one of directions 000010000 with speed 4

In Collision with object_Mouth:
Quote
If Vacuum is equal to 1
Start of block
Destroy the instance
Set relative variable Fuel to 1
Set relative variable Fuel to 1
Set the relative score to 1
End of block

8
Issues Help Desk / Re: Turning On A Variable Disables Character Movement
« on: January 05, 2018, 08:11:28 pm »
I apologize for taking so long to respond to this; I was on a trip.

The variable's name is "Vacuum".  Incidentally, when it loaded up, I also saw this alert:

Quote
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:2279:7: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
     if(action_if_variable(enigma::varaccess_Vacuum(int(self)), 1, 0))

What are "explicit braces"?

9
Issues Help Desk / Turning On A Variable Disables Character Movement
« on: December 18, 2017, 09:42:56 pm »
Self-quote, from the other thread:
I may have discovered another bug.  For some reason, turning on a user-defined variable (by holding a button) messes with a character's movement.  The character either stops moving, or moves in weird ways.  I haven't been able to duplicate this in my experiment file (the "Jump" one), but I'll keep trying to figure out what's wrong.  In the meantime, if this helps, the character's movement uses variables as well; the hspeed and vspeed variables in the "Step" event.
Last I checked, this was never solved in the original thread I posted it in.  That's partially my fault.  As I am having this issue in a game I made in GM8 and hope to sell--and was also hoping to port to Enigma--I declined to provide the file.  I attempted to duplicate the bug with a new game specially made to duplicate this issue, but I couldn't.

I'd appreciate all the help I can get in digging up what might be causing this issue.  Admittedly, that might not be too easy without me providing the game, but maybe we can work something out.  Note that I actually can provide the code for the parts of my game that have this problem.

10
Oh, then I apologize.  Issue remains, then.

11
So that implies that you've seen such things before.  I'd rather not destroy and replace the object, since that opens up a bunch of other cans of worms, and the current object has too much complex code and things pointing to it not to cause errors from its destruction.  To do this would necessitate rewriting most of the code from scratch, and probably figuring out new ways to do things I had down fine.  None of that pausing happens in Game Maker, so a bug is a bug and a bug deserves research and repair.  Still, any insight into what causes this, and is there a way to fix it that doesn't involve destroying and replacing the player object?

12
I may have discovered another bug.  For some reason, turning on a user-defined variable (by holding a button) messes with a character's movement.  The character either stops moving, or moves in weird ways.  I haven't been able to duplicate this in my experiment file (the "Jump" one), but I'll keep trying to figure out what's wrong.  In the meantime, if this helps, the character's movement uses variables as well; the hspeed and vspeed variables in the "Step" event.
Are you swapping any objects that depend on user input? You might need an io_clear() somewhere

Possibly so, but what do you mean by "swapping"?  I'm not turning an instance into another instance, of that's what you meant.  There are two objects that utilize the one's offending variable, but to test out the bug, I deleted the other object, and it still happens.

13
I may have discovered another bug.  For some reason, turning on a user-defined variable (by holding a button) messes with a character's movement.  The character either stops moving, or moves in weird ways.  I haven't been able to duplicate this in my experiment file (the "Jump" one), but I'll keep trying to figure out what's wrong.  In the meantime, if this helps, the character's movement uses variables as well; the hspeed and vspeed variables in the "Step" event.

14
This is definitely a bug, the question is what part.

So the way this works is the lgmplugin that plugs ENIGMA into LateralGM converts all your actions to GML code before sending it to ENIGMA. ENIGMA then converts the GML over to C++.
https://github.com/enigma-dev/lgmplugin/blob/master/org/enigma/EnigmaWriter.java#L1189

Judging by the output in C:\ProgramData\ENIGMA\Preprocessor_Environment_Editable\IDE_EDIT_objectfunctionality.h the bug appears to be in the plugin, because there should actually be a with(-1) meaning self around the action_move_to.

Code: (cpp) [Select]
variant enigma::OBJ_object_Arrow::myevent_step()
{
  { if (timeline_running && timeline_speed!=0) advance_curr_timeline(); }
with((0))
    if(action_if_variable(enigma::varaccess_Jump(int(self)), 1, 0))
  {
    argument_relative = 0;
    action_move_to(enigma::glaccess(int(object_Ball))-> x + 5, enigma::glaccess(int(object_Ball))-> y - 20);
   
  }
  with((0))
    if(action_if_variable(enigma::varaccess_Jump(int(self)), 0, 0))
  {
    argument_relative = 0;
    action_move_to(100, 100);
   
  }
  ;
 
  return 0;
}

This is a new issue that I am surprised wasn't reported before, either way I've filed a bug on the lgmplugin:
https://github.com/enigma-dev/lgmplugin/issues/54

Not sure when it may be fixed, busy working on sumptin' TOP secret so you won't have to worry about this problem ever again.

Thank you; that worked!  I also went a lot faster when I realized I could click on a close bracket and be shown where it opened.

15
So, I've been working on getting the revised code into my game, and I get the following compile error:
Quote
Check `object_Mouth::step...Syntax error in object `object_Mouth', Step event:0:
Line 15, position 17 (absolute 537): Expected closing parenthesis before closing brace

Which is bizarre, because looking at the code, it seems like I actually have it:
Code: [Select]
if(sprite_index==sprite_StellaSouthwest) {
                with(other){
                        x=object_Bee.x-15;
                        y=object_Bee.y+27;
                }

Any idea why this error is being triggered?

Pages: 1 2 3 »