mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-11-24 22:34:21 +03:00
Add edentity blocks & associated script commands
This PR is a redo of #909 which improves the edentity handling, abstracting activity zone types to level data rather than being a part of entity data. This commit allows users to place down the game's "blocks" in the editor, being collision blocks, hurt boxes, gamestate triggers, script boxes, activity zones, "safe" boxes, and one-ways. Activity zones now have some level XML to allow defining new activity zone IDs: ```xml <ActivityZones> <activityZone id="36" colour="red"></activityZone> <activityZone id="37" colour="orange">Press {button} to do something</activityZone> </ActivityZones> ``` These add IDs 36 and 37 (with 0-35 replacing the built-in ones), for use with custom spawned or placed activity zones. If the text is empty, it will use the built-in localization string "Press {button} to interact", and if "colour" is missing, it will default to "orange". New commands: - `createcollision(x,y,w,h)` - Creates a collision block - `createtrigger(x,y,w,h,gamestate)` - Creates a gamestate trigger - `createscript(x,y,w,h,script)` - Creates a (custom!) script box - `createdamage(x,y,w,h)` - Creates a damage block - `createdirectional(x,y,w,h,dir)` - Creates a "directional" block - `createsafe(x,y,w,h)` - Creates a "safe" block - `createactivity(x,y,w,h,script[,id])` - Creates an activity zone If `id` is not passed into `createactivity`, it will default to 35. Custom activity zones created this way can also be affected by `setactivitytext`, `setactivitycolour` and `setactivityposition`. Co-authored-by: Dav999 <dav999.tolp@gmail.com>
This commit is contained in:
1 parent
fc89b2e7bf
commit
7d163c0f93
9 files changed
+258
-31
No files matched your search
@@ -230,6 +230,8 @@ public:
|
||||
int regionwidth, regionheight;
|
||||
|
||||
MapRenderData get_render_data(void);
|
||||
|
||||
int tempscriptbox;
|
||||
};
|
||||
|
||||
#ifndef MAP_DEFINITION
|
||||
|
||||
Reference in new issue
Block a user