Walking through water... a la Mystic Searches/Origins!

After player Mystic Origins, i did notice theat the collision detection between the water animation to getting out on to a walkable tile looks realy fluid.

This water code does seem to have a couple bugs.
How can we go about making the collision between water and walkable a smooth transition?
 

dale_coop

Moderator
Staff member
I think the solid collision detection used in Mystic Origins is slightly different that the one we have in the 4.1.5
In the current version, the collision detection is kinda... weird. sometimes.
 
dale_coop said:
I think the solid collision detection used in Mystic Origins is slightly different that the one we have in the 4.1.5
In the current version, the collision detection is kinda... weird. sometimes.

OK that is very good to know It has made for some very ugly transitions I'm using it a lot in one of my games and it just looks bad right now.
 
RinRem01 said:
I used this script to simulate walking through tall grass. However, once I walk into the tall grass tile my character quits walking. He looks in the directions I press, and he does the "InWater/TallGrass" animation, but he doesn't go anywhere. I copied the script word for word (I even kept it called "InWater" so I wouldn't screw up) :lol: . Any ideas? Thanks.

This is happening to me as well.

Made the Inwater.asm, put it in the Tile Script folder and tile script>Adventure folder. Went to project settings and assigned the Script and updated the root. I go in the water and just get stuck. Did anyone figure this out? How come the INwater name doesnt come up in the collision list?
 

dale_coop

Moderator
Staff member
The trick is to set the "inWater" action step to "GotoFirst" after timer of "1" (or at the end of animation)

(That in water animation is a really quick and not perfect solution... but for a small demo, it does the job... an for a bigger scale game --commercial game-- you will have to code that better)
 

TolerantX

Active member
I tweaked the code for my game and made it work in 4.5 if anyone is still interested:

(This uses object 00 for player1 which is probably the most common...)
(This uses that object to have water movement for directions set to action step 4)
(In line 6 if you want to change the action step make sure to change arg01 as well in line 8)

Code:
;;;; If you touch this tile it will be in water ;;;;

	CPX player1_object		;; Is it player 1 object? ;;
	BNE notInWater			;; not the player? then go to notInWater ;;
	GetActionStep player1_object	;; check if player is in water_tile below ;;
	CMP #$04			;; this number should be the action step. is player action step 04?  ;;
	BEQ notInWater					
	ChangeActionStep #$00, #$04      ;; arg0 is player1_object, arg01 is Action Step number from line 6. ;;
 	
notInWater:
 

dale_coop

Moderator
Staff member
Code:
	ChangeActionStep player1_object, #$04
would be safer (just in case, you use another than object 0 as your player... when having a player switch system, for example)
 
Top Bottom