scripting object events and movements
BlitzMax Forums/BlitzMax Programming/scripting object events and movements
| ||
hi guys ive been using blitzmax for a couple of months now. Im not exactly new to programming but id say im somewhere between beginner and intermediate. well the problem i am having is im trying to make an event based engine. for example if any of you have ever used rpg maker. basically "the player collides with this object and triggers an event" such as a cutscene in an rpg. but ive been trying for 3 days to get an engine going and im not getting anywhere. i want something like this: EVENTHANDLER.begin() moveevent(player, 5 steps to the right) moveevent(player, 5 steps down) speakevent(player, "hello i am the hero") speakevent(enemy1, "lets fight!") battlebeginevent(player,enemy1) EVENTHANDLER.end() see this would be A lot easier than using many nested if statements which would be sloppy and difficult to debug and manage. Im not asking you guys to write my game for me. Im asking for an example or a link to something which might help. Any help would be greatly appreciated. |
| ||
Hi Xin, welcome to the forums. There has been some discussion on this subject in this thread, so make sure to take a look. |
| ||
I haven't properly tested it, but should give some ideas.0 moving moving 1 2 3 moving 4 5 attacking Last edited 2011 Last edited 2011 |
| ||
thanks for the responses and thank you Czar for that example. it was enough to help me understand how my types and the event manager should be structured. =D hopefully it will be enough to get a decent event system running. i just want to be able to do simple cutscenes without having to use pre-rendered video Last edited 2011 Last edited 2011 |