RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Modication to NeonBlack's Terrain Tags Script

0 Members and 1 Guest are viewing this topic.

*
Rep: +0/-0Level 37
RMRK Junior
NeonBlack's Terrain Tags Script Modifications
6/18/2014



Summary
I'm using NeonBlack's Terrain Tags Script in tandem with Victor's Pixel Movement script and they are working together without any problem.

With NeonBlack's Terrain Tags script, you can use region tags to do things such as covering the player with a wall tile and block your movement completely and several other things (refer to the link above if you need more info). Anyway, I mostly use his cover and block tags to be able to go under walls and ceilings tiles. I used to use the bridge tags in the project, too, but since I implemented Victor's Pixel Movement script, I stop using those tags because of incompatibility issues and I've found other way of making a bridge anyway (if you're interested).

Features Desired
  • Add a tag to NeonBlack's script to both cover and block the player at the same time

Mockups
Some picture to show my point:

As you can see, thanks to Victor's script, my character can pixel-move but that lead to weird moments when the characters had their top of their sprite shown when they are supposed to be covered.



The default settings are: the tag for COVER tiles is 18 and BLOCK tiles is 19. Whenever you put the region tag 18 on a tile, they will be passable and cover you. Same goes for tag 19, only that it blocks you completely instead.



So if you change the BLOCK tag to 18, whenever you put tag 18 on a tile, it will cover and block you at the same time.

That's what I'm trying to achieve here. I want to preserve the original tags, while adding a new one that will both cover and block the player at the same time.

Final Notes
 The Terrain Tag script is rather simple, while Victor's Pixel Movement script is more complex, but I don't think you will need to change anything to Victor's script, since both is working fine together, just keep it in mind. I have added both scripts below, for convenience and also because Victor's script links are not working. I also added a experiment project below which contains the script regarding this request (don't concern your self with other things in the project). If you need more info of the scripts itself, please refer to the links above.