mirror of https://github.com/pret/pokeemerald.git
Updated Useful Scripting Specials (markdown)
parent
37ba7b86d2
commit
e0a696d9df
|
@ -33,7 +33,7 @@ void GetObjectPosition(void)
|
||||||
if (!useTemplate)
|
if (!useTemplate)
|
||||||
{
|
{
|
||||||
/* current position */
|
/* current position */
|
||||||
const u16 objId = GetObjectEventIdByLocalIdIncludeInactive(localId);
|
const u16 objId = GetObjectEventIdByLocalId(localId);
|
||||||
const struct ObjectEvent *objEvent = &gObjectEvents[objId];
|
const struct ObjectEvent *objEvent = &gObjectEvents[objId];
|
||||||
*x = objEvent->currentCoords.x - 7; // subtract out camera size
|
*x = objEvent->currentCoords.x - 7; // subtract out camera size
|
||||||
*y = objEvent->currentCoords.y - 7;
|
*y = objEvent->currentCoords.y - 7;
|
||||||
|
@ -53,3 +53,9 @@ void GetObjectPosition(void)
|
||||||
3. Finally, add our new special to the specials table in `data/specials.inc`
|
3. Finally, add our new special to the specials table in `data/specials.inc`
|
||||||
|
|
||||||
`def_special GetObjectPosition`
|
`def_special GetObjectPosition`
|
||||||
|
|
||||||
|
## 2. checkobjectat
|
||||||
|
|
||||||
|
credits to ghoulslash
|
||||||
|
|
||||||
|
Checks in any object is at a given position
|
||||||
|
|
Loading…
Reference in New Issue