My apologies, not sure what happened there!
- Game Maker Community
- → Viewing Profile: Posts: Camman
Camman
Member Since 18 Mar 2006Offline Last Active Apr 24 2013 12:18 AM
Community Stats
- Group GMC Member
- Active Posts 634
- Profile Views 4189
- Member Title UnReal Software CEO
- Age 20 years old
- Birthday November 22, 1992
-
Gender
Male
-
Location
Missouri
-
Version
GM:Studio
Latest Visitors
Posts I've Made
In Topic: Blackjack (21)
15 April 2013 - 12:48 AM
In Topic: [Solved] Gm Studio - Left Mouse Pressed & Released
11 April 2013 - 01:32 PM
So, if I am understanding correctly, you *only* want the code to be performed if the user presses & releases the mouse on the same object?
If so, try creating a temporary variable (let's say pressed) in the "Create Event" and set it to false. In your "Left Pressed" event, set pressed to true. Now, in your "Left Released" event, check and see if pressed is true. If it is, do your desired action. If it is not, then do not. Either way, make sure you set pressed back to false afterwards. Also, create a "Global Left Released" event. In this event, set pressed to false. This will prevent the pressed variable from staying set to true if you release the mouse while not on your object (and thus preventing undesired functionality if the user presses on the object, moves the mouse off the object, releases, presses again off the object, moves the mouse back on to the object, and releases again).
In Topic: Advanced Inventory System
11 April 2013 - 01:17 PM
Anyway, yes, that should work. However, from a performance standpoint, it is not as efficient as using user defined events. You can add user defined events like any other event: Add Event -> Other -> User Defined. GM:Studio allows for up to 15 user defined events.
with (item_object)
{
event_perform(ev_other, ev_user0);
}
Put the code you want to execute when the item is used in your user defined event. This event will only be triggered when you use the code above.This way is more efficient, because you aren't constantly checking to see if the item has been used. It only uses the item when you trigger the event.
In Topic: Storing An Array Inside A Ds_Map
01 April 2013 - 03:47 PM
You're much better off leaving arrays alone and just use one of GM's data structures (ds_* functions).
Just make sure to properly remove all of those data structures from memory when you're done with them (memory leaks = bad)!
In Topic: Write Your Own Assert Script?
01 April 2013 - 03:39 PM
- Game Maker Community
- → Viewing Profile: Posts: Camman
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content
