Forum

> > CS2D > Maps/Editor > [TUTORIAL]Layering Entities
Forums overviewCS2D overview Maps/Editor overviewLog in to reply

English [TUTORIAL]Layering Entities

14 replies
To the start Previous 1 Next To the start

old [TUTORIAL]Layering Entities

MikuAuahDark
User Off Offline

Quote
Layering entities tutorial by MikuAuahDark

∗ Description ∗
This tutorial would allow you to know how to layering entities. It mean, more than 1 entities in a 1 tile

∗ Warning ∗
user DC has written
Please be aware that such hacks CAN lead to more or less critical errors. This includes putting multiple entities on the same tile. It may lead to misbehavior of AI, Lua scripts and other - even worse - things including freezes/crashes. This highly depends on the types of the used entities though. Stacking entities which do not affect the gameplay like effect entities probably won't cause problems. Anyway: I don't recommend to "hack" map files under normal circumstances. It may also completely break your map with new game updates and make it unusable.


∗ Notes ∗
1. Some entities may not function correctly when layered(most of Trigger_ entities)
2. You may need to learn this first
3. Actually this tutorial is requested by user log_in so i made it

∗ Requirements ∗
1. Counter-Strike 2D Map
2. HexEdit
3. Knowledge about this

∗ How to ∗
1. Open/Create CS2D map and add your entity that want to be layered. Also give the entity a name, it would more easier to find it.

2. Save the map
3. Open HexEdit(I use HexEdit 4) and open the map.
IMG:https://i43.tinypic.com/11qtif5.png

4. Find the entity name that want to moved to another position(In picture i use Info_CT)
IMG:https://i39.tinypic.com/2ps3qcp.png

5. Now it's the little confusing part. Please note that the entity format is like this:
1
2
3
4
5
6
7
8
9
String - Entity name, Linebreak afterwards(can be empty and just give a linebreak character(0D 0A))
Byte - Entity ID(List is here: thread:358933)
4 Byte - Entity X position in tile
4 Byte - Entity Y position in tile
for i=1,10 do
	4 Byte - Entity number "i" setting
	String - Entity string "i" setting(linebreak afterwards, can be empty)
end
.. Next Entities ..
All of you need to do is to move the entity position
6. Check the position of the entity that would be the poisition of the another entity. Remember it
IMG:https://i41.tinypic.com/23t4irm.png

7. Go to the entity that would moved
8. Edit the bytes of the position to exactly of the first entity
IMG:https://i40.tinypic.com/2l94c4z.png

9. Save
10. Test, open editor, if it works, then you may see Info_T and Info_CT in 1 tile


∗ Layered Entity Maps ∗
LayeredEntities - Used map in this tutorial | user MikuAuahDark
file cs2d DeathRun TRON - A deathrun map that also use layered entities system | user Iamle0
edited 2×, last 04.02.14 06:41:48 am

old Re: [TUTORIAL]Layering Entities

MikuAuahDark
User Off Offline

Quote
user VADemon has written
Btw what happens when you try to edit an entity on that tile?
Because only 1 menu is showed, then only 1 of 2(or more) entity is editable with Bulit-In CS2D entity properties

old Dark xD

ReVoltage
User Off Offline

Quote
Great, useful for mapping.
Im looking for this tutorial, lol.
Now i know how you do that in a map

old Re: [TUTORIAL]Layering Entities

log_in
User Off Offline

Quote
really useful tutorial thanks! - edit

nice, working fine!


'
and it seems, entity type : "Trigger_" entities aren't work when they stacked/layered
edited 2×, last 15.08.13 02:41:36 pm

old Cause and effect

KimKat
GAME BANNED Off Offline

Quote
Another viable solution to achieve similar effect would be by using cs2d cmd setpos in order to set position of player(s) to specific tile(s) on cs2d lua hook spawn. By using the map's very own Lua script (%map%.map -> %map%.lua). Hope this helps as a workaround however if it all becomes to complicated to perform. Great effort by user MikuAuahDark in doing this map hack anyhow I appreciate it.
To the start Previous 1 Next To the start
Log in to reply Maps/Editor overviewCS2D overviewForums overview