game-makergame-maker-languagegame-maker-studio-1.4

How to create multiple different enemies by one instance


I want to create one instance, named obj_enemy and I want to place several of them in one room but each one has to use different path and weapons, so is there a function etc to use? like an object id to give each one different event. or should i use scripts and how should i use it. any better solutions will be considered!


Solution

  • You can use the room editor: right-click the object and select 'creation code' or when creating the instance use the 'with' statement. Code placed in there will be executed just after the create event, so you can override the variables. Another option is to use child/parent, but it wouldn't be efficient if you want separate paths.