Help with this crazy teleport move

esn23

Active member
So basically I want my character to do exactly what is in this video.. In her second mode I want her to be able to hold block as she holds block I want her to transform into this ball of energy that you can control with u, d, l and right.. I want her to pass through walls and such too like in this video and lastly when she passes through enemies I want it to damage them. Also while she is holding block I want her mp to drain as she does this move.. I know scripts are involved.. I also know I probably have to make a third weapon mode for her but that is where my knowledge ends lol please if someone can explain how to do this I will be done with another character for the demo..

https://www.youtube.com/watch?v=ghE-tFxVLYc&t=16s
 
- On your player
create a weapons
Create a freespecial command seting this weapon (weaponframe) that will go to another entity with empty frames.gif

- Weapon Entity
create a new entity, modelfalg 1,  with "SUBJECT_TO_WALL 1" in its header
IN THE body you just use an idle with jumpframe to advance. Use also change anim folow for him to jump to a folow with another weaponframe that returns to his player.

Comand teleport>>weaponframe subjtect to wall>>Back to char. ::)
 
would this method work if she already is in a weapons mode.. I use weapons to switch modes, this would be for her second mode so would that work?
 
I agree with NSW. You don't need another weapon at all. Avoid to create new weapons unless you have to.

Its better to try to learn so you can judge when to use scripts or when to use weapons. Weapons are not for simple cases like "oh, I want my character to have a different walk velocity, so I will make another weapon". Its just a waste of resource.

Since you are working with BB on this mod, I am pretty sure you already have part of his library of scripts, like "keymove". So you just put this code in every frame you want to make it to move

Code:
	@cmd	keymove 2
2 is the velocity you want.

If you don't have the code, here is the function:
Code:
void keymove(float V)
{// Move hero if direction button is pressed
      void self = getlocalvar("self");
      int iPIndex = getentityproperty(self,"playerindex"); //Get player index
	float xdir = 0;
	float zdir = 0;

      if (playerkeys(iPIndex, 0, "moveleft")){// Left is pressed?
	  xdir = -V;
	} else if(playerkeys(iPIndex, 0, "moveright")){// Right is pressed?
	  xdir = V;
      }
	if(playerkeys(iPIndex, 0, "moveup")){// Up is pressed?
	  zdir = -V/2;
	} else if(playerkeys(iPIndex, 0, "movedown")){// Down is pressed?
	  zdir = V/2;
      }

	changeentityproperty(self, "velocity", xdir, zdir);
}
Just put it in your animationscript. Basically, it makes the same thing of the code NSW posted above. Both will work.

So, you put one of those codes on your block animation and it will move. If you character blocks with the Special button, you just need to add "holdblock 1" to the character header and he will hold the block. If not, you will need to check the link NSW posted above for a button hold scripted block.

About the walls, its not a simply subject_to_wall change, because if you release the block inside a wall, your character will:
a) moved on top of the wall (if it is not tall)
b) removed (killed) from the screen if the wall is tall.

You will need to work with an Antiwall code. BB made one, I believe its in your game script library already.
 
esn23 said:
would this method work if she already is in a weapons mode.. I use weapons to switch modes, this would be for her second mode so would that work?

Yes, is just YOU set a weapon in this weapon. But, remember.

-If you use Follow2 to transform, the another entity needs have the some follow2 LOOP 0 (IMPORTANT)

IF YOU DONT WANT TO USE WEAPONS...

-You can use also a simple freespecial bbox AND OFFSET w/ HIGHT Y VALUE and move/jumpframe. (WHILE HE IS ON INVISIBLE FRAMES)

ALSO You can use a contolled pain to advanced on move.

The simple freespecial w/ offset control method is the easyest way on my oppinion. This way you do not need hold a buttoon, but just use a command. Try to make a small wals dimensions.

Spending of ressources  or not IT HAS NOT ANY IMPORTANCE...the important is work, DONT CRASH, and make exactaly what you want to make.  8)

USE THE METHOD YOU FEEL BETHER! FELL FREE. :D

 
About the MP consumption, you can use this small script and add "energycost 2 1 0" to the block animation, so she will use MP for blocking
Code:
	@script
	void self = getlocalvar("self");
        void MPower = getentityproperty(self,"mp"); //get mp
	if (MPower <= 2){
    changeentityproperty(self, "animation", openborconstant("ANI_JUMP"));
	   }
	@end_script
This code will make her to change to JUMP animation (you can change if you want) when she is out of MP.

Scripts are way easier than they looks. You just need to try to jump at it. I've saw people with no script knowledge doing cool things (like weapon change and rope jumps) after they put effort on it.

Try to push yourself, the reward is amazing ;)
 
Back
Top Bottom