The VG Resource

Full Version: C++ and Game Maker Language place_meeting help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
N. USA = North United States of America
& = and

My name is Jason
& I am from N. USA
& I live in N. USA
& I was born in N. USA

Here is
Game Maker Language (GML)
version:
Code:
if (place_meeting(x+arctan(14),y,object))
{
  vspeed = 0;
}
^ So what is the C++ of ^ (
Code:
if (place_meeting(x+arctan(14),y,object))
{
  vspeed = 0;
}
) please, thank you Wink ; ) : ) Smile
I don't care where you are from TongueTongue




C++ is no language crafted specifically for game creation. Thus, you won't find such a function. However, depending on whatever premade engine you ight want to use, they might feature something similar. I'm pretty sure there are tons of game making engines for C++. I can't point you to anything specific, though.

Basically, in C++, you'll need to make a base class for your game objects which has all basic properties like x and y position as well as width and height. Then you can make a function which checks if a given point is within an objects boundaries. Note that the basic object class of C++ does not include the advanced specific properties a GML object has.
Generally speaking, if you want to recreate your given GML code in C++ without using an engine made by someone else, you're gonna have a bad time.