Smart Entities

Smart Entities are an upgraded form of Entities where the shared properties are taken to another level. You don't have to even make a struct. All you have to do is make an instance of oMySmartEntity and add variables to it! And it will be created for everyone else with the same variables shared.

This can be used to represent things that the player owns, like a gun, or bullets fired by the player.

Similar to our previous oMyEntity and oOtherPlayerEntity we have oMySmartEntity and oOtherPlayerSmartEntity

This means that clients can have Smart Entities that belong to them. Like my client can have aSmart Entity representing a 'Gun'.

// oMySmartEntity Step Event

___sprite_index = sAssaultRifle
___image_angle = image_angle

ammo_left = 12

It will automatically appear on other people's screens as an instance of oOtherPlayerSmartEntity, and the sprite index and image angle will be updated. Also the variable ammo_left will be created and updated.

Last updated