Everything looks A OK now.
So what's planned next?
So what's planned next?
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.
Quote from: Josh @ Dreamland. on January 28, 2011, 05:44:45 AMIt's always allowed that sort of thing. It doesn't care about the brackets:
I was under the impression the syntax was strictly as follows:Code Select
(obj).variable = value;
If GM is suddenly allowing that sort of thing, I will remove all checks related to assignment operators. That will add compatibility with stream structures like cout, anyway.
(((((script())).meh.hello))) = (script().derp);
(variable) = value;variable.(loc) = value
(obj.variable) = value;double move_contact_object(double angle, double dist, const int object, const bool precise = false, const bool solid_only = false)
{
const double contact_distance = ((precise) ? 0.000001 : 1);
dist = abs(dist);
angle = ((angle mod 360) + 360) mod 360;
enigma::object_collisions* const inst1 = ((enigma::object_collisions*)enigma::instance_event_iterator->inst);
const int quad = int(angle/90.0);
for (enigma::inst_iter *it = enigma::fetch_inst_iter_by_int(object); it != NULL; it = it->next)
{
const enigma::object_collisions* inst2 = (enigma::object_collisions*)it->inst;
if (inst2->id == inst1->id || solid_only && !inst2->solid) {continue;}
if (inst2->x + inst2->bbox_right >= inst1->x + inst1->bbox_left && inst2->y + inst2->bbox_bottom >= inst1->y + inst1->bbox_top && inst2->x + inst2->bbox_left <= inst1->x + inst1->bbox_right && inst2->y + inst2->bbox_top <= inst1->y + inst1->bbox_bottom)
{
dist = 0;
break;
}
switch (quad)
{
case 0:
if ((inst2->x + inst2->bbox_left > inst1->x + inst1->bbox_right || inst1->y + inst1->bbox_top > inst2->y + inst2->bbox_bottom) &&
direction_difference(angle, point_direction(inst1->x + inst1->bbox_right, inst1->y + inst1->bbox_bottom, inst2->x + inst2->bbox_left, inst2->y + inst2->bbox_top)) >= 0 &&
direction_difference(angle, point_direction(inst1->x + inst1->bbox_left, inst1->y + inst1->bbox_top, inst2->x + inst2->bbox_right, inst2->y + inst2->bbox_bottom)) <= 0)
{
if (direction_difference(angle, point_direction(inst1->x + inst1->bbox_right, inst1->y + inst1->bbox_top, inst2->x + inst2->bbox_left, inst2->y + inst2->bbox_bottom)) > 0)
{
dist = min(dist, (inst1->y + inst1->bbox_top - (inst2->y + inst2->bbox_bottom) - contact_distance)/sin(degtorad(angle)));
}
else
{
dist = min(dist, (inst2->x + inst2->bbox_left - (inst1->x + inst1->bbox_right) - contact_distance)/cos(degtorad(angle)));
}
}
break;
case 1:
if ((inst1->x + inst1->bbox_left > inst2->x + inst2->bbox_right || inst1->y + inst1->bbox_top > inst2->y + inst2->bbox_bottom) &&
direction_difference(angle, point_direction(inst1->x + inst1->bbox_left, inst1->y + inst1->bbox_bottom, inst2->x + inst2->bbox_right, inst2->y + inst2->bbox_top)) <= 0 &&
direction_difference(angle, point_direction(inst1->x + inst1->bbox_right, inst1->y + inst1->bbox_top, inst2->x + inst2->bbox_left, inst2->y + inst2->bbox_bottom)) >= 0)
{
if (direction_difference(angle, point_direction(inst1->x + inst1->bbox_left, inst1->y + inst1->bbox_top, inst2->x + inst2->bbox_right, inst2->y + inst2->bbox_bottom)) > 0)
{
dist = min(dist, (inst2->x + inst2->bbox_right - (inst1->x + inst1->bbox_left) + contact_distance)/cos(degtorad(angle)));
}
else
{
dist = min(dist, (inst1->y + inst1->bbox_top - (inst2->y + inst2->bbox_bottom) - contact_distance)/sin(degtorad(angle)));
}
}
break;
case 2:
if ((inst1->x + inst1->bbox_left > inst2->x + inst2->bbox_right || inst2->y + inst2->bbox_top > inst1->y + inst1->bbox_bottom) &&
direction_difference(angle, point_direction(inst1->x + inst1->bbox_right, inst1->y + inst1->bbox_bottom, inst2->x + inst2->bbox_left, inst2->y + inst2->bbox_top)) <= 0 &&
direction_difference(angle, point_direction(inst1->x + inst1->bbox_left, inst1->y + inst1->bbox_top, inst2->x + inst2->bbox_right, inst2->y + inst2->bbox_bottom)) >= 0)
{
if (direction_difference(angle, point_direction(inst1->x + inst1->bbox_left, inst1->y + inst1->bbox_bottom, inst2->x + inst2->bbox_right, inst2->y + inst2->bbox_top)) > 0)
{
dist = min(dist, (inst1->y + inst1->bbox_bottom - (inst2->y + inst2->bbox_top) + contact_distance)/sin(degtorad(angle)));
}
else
{
dist = min(dist, (inst2->x + inst2->bbox_right - (inst1->x + inst1->bbox_left) + contact_distance)/cos(degtorad(angle)));
}
}
break;
case 3:
if ((inst2->x + inst2->bbox_left > inst1->x + inst1->bbox_right || inst2->y + inst2->bbox_top > inst1->y + inst1->bbox_bottom) &&
direction_difference(angle, point_direction(inst1->x + inst1->bbox_right, inst1->y + inst1->bbox_top, inst2->x + inst2->bbox_left, inst2->y + inst2->bbox_bottom)) <= 0 &&
direction_difference(angle, point_direction(inst1->x + inst1->bbox_left, inst1->y + inst1->bbox_bottom, inst2->x + inst2->bbox_right, inst2->y + inst2->bbox_top)) >= 0)
{
if (direction_difference(angle, point_direction(inst1->x + inst1->bbox_right, inst1->y + inst1->bbox_bottom, inst2->x + inst2->bbox_left, inst2->y + inst2->bbox_top)) > 0)
{
dist = min(dist, (inst2->x + inst2->bbox_left - (inst1->x + inst1->bbox_right) - contact_distance)/cos(degtorad(angle)));
}
else
{
dist = min(dist, (inst1->y + inst1->bbox_bottom - (inst2->y + inst2->bbox_top) + contact_distance)/sin(degtorad(angle)));
}
}
break;
}
}
inst1->x += cos(degtorad(angle))*dist;
inst1->y -= sin(degtorad(angle))*dist;
return dist;
}
inline int move_contact_all(const double direction, const double speed, const bool precise = false)
{
return move_contact_object(direction, speed, all, precise);
}
inline int move_contact_solid(const double direction, const double speed, const bool precise = false)
{
return move_contact_object(direction, speed, all, precise, true);
}
inline int move_contact(const double direction, const double speed, const bool precise = false)
{
return move_contact_object(direction, speed, all, precise);
}
Quote from: HaRRiKiRi on January 25, 2011, 11:06:56 PMIt's still possible to reference the index using D&D or control in GML via parenting. Note the same issue exists with duplicate resource names which GM also allows.QuoteResource names should allow spaces in LGM, so the behavior you describe is not desired.Actually it could be desired (like showing an error). Because yeah, GM allows this too, but then assigning this resource is impossible. Like if you have "object 0" you will not be able to get the id for that object like so:Code Selectwith (object 0){}That will clearly show an error, and so maybe this should not be encouraged? On the other hand, while writing this I kind of guess that it is up to the user, and if the system allows this, then be it. On the other hand if LGM or ENIGMA should of be rewritten just to allow this, then I wouldn't see the point.
Quote from: IsmAvatar on January 25, 2011, 05:01:00 PMYes, I don't know why I didn't do that..
Please run from the terminal and see if it outputs any kind of errors or strange output.
QuoteException in thread "Thread-19" java.util.regex.PatternSyntaxException: Unexpected internal error near index 1\And I see what the issue is with the object name being cleared. It's because there is a space used in the object resource name, which apparently makes LGM just clear it.
^
at java.util.regex.Pattern.error(Unknown Source)
at java.util.regex.Pattern.compile(Unknown Source)
at java.util.regex.Pattern.<init>(Unknown Source)
at java.util.regex.Pattern.compile(Unknown Source)
at java.lang.String.replaceAll(Unknown Source)
at org.enigma.EnigmaWriter.toString(EnigmaWriter.java:906)
at org.enigma.EnigmaWriter.getActionsCode(EnigmaWriter.java:883)
at org.enigma.EnigmaWriter.populateObjects(EnigmaWriter.java:582)
at org.enigma.EnigmaWriter.populateStruct(EnigmaWriter.java:124)
at org.enigma.EnigmaWriter.prepareStruct(EnigmaWriter.java:109)
at org.enigma.EnigmaRunner$3.run(EnigmaRunner.java:513)
QuoteWhen running the game. I think it might have something to do with the background but I'm not entirely sure what it is.
Also, when you say the object is not visible, *where* is the object not visible? In the LGM resource tree? In the LGM room editor? In the game when running?
45 div 90script() div 90var variable = script();QuoteUnknown compilation settings for your platform. Perhaps your platform isn't supported.I no longer got it after restarting LGM though.
QuoteThis application has failed to start because OpenAL32.dll was not found.But after installing OpenAL manually Enigma appears to all be working correctly
