Solved Change entity's speed Trap

Question that is answered or resolved.

betterbold

Active member
It may also foregoing topic but I need it.
Player walk on the "specific tile" then player's speed gain.
But player pass by it, player's speed become normal again.

Is it possible ? :)
 
I need to know what kind of platform is that.
If it's a conveyer belt or a field which hasten players or entities above it, a script in platform would be better to do that
 
@Bloodbane
Thanks for your comment.
This is my idea. :D

I tried to make attackbox in Squid's WALK and add "followcond" "followanim".
Then I add "move 10" in follow animation but it looks no good...
Let me know if you know of any better way.
 
I know there is a way to do it with script but there is a easier way to do it without any script. And you have way more freedom.
Just use invisible platform on the ground, with a x velocity. While you are over it, it will make your character to move forward.

See the squid on the ground? Make it spawn constantly a fake platform, which moves forward and dies very shortly (using lifespan).
The same logic can be used for conveyor belt too.
(Thanks Daniel de Lima for the idea)
 
This technique will be very useful for dash panels, conveyor belts, whirlpools, etc., for running sections and more. Nice! They can even be set up in air, right? This would make interesting combat situations. Now, for the possibility of making a two-sided speed panel, a biggger boost you have to pay for, etc...

And also, I was planning on a Splatoon mod as well.
 
Thanks! Now to figure out how to make a platform/obstacle that springs enemies into the direction it is pointing, such as into the air and something that harmlessly bumps entities back by force without dealing damage, and we can easily compliment the slope function with lots more Sonic-inspired tools to use. And maybe the platform speed boost can be tweaked to make applicable entities forced to attack as they dash?
 
Now to figure out how to make a platform/obstacle that springs enemies into the direction it is pointing,
Just make the fake entity to spawn platform to forward. If you want to make it to spawn backward, just turn the entity around.

something that harmlessly bumps entities back by force without dealing damage,
Platform will push the entity to the same direction they are going to. Just make those platform go backward. It will force the player backward.

And maybe the platform speed boost can be tweaked to make applicable entities forced to attack as they dash?
They won't "dash". They will move forward anyway.

 
@NickyP
I love splatoon too. ;D
I enjoyed to play your mods. Thanks !!

@O Ilusionista
Thanks for your help. I could do it without scripts as you say. ;)
I'll release DEMO soon.
 
I've watched a video of Splatoon and understand how the paint works. After some thought I decided to use script on player's text to detect his/her distance from paint and increase speed if he/she is on paint

This is the script:
Code:
void AreaBoost(int Speed1, int Speed2)
{//
  void self = getlocalvar("self");
  int x = getentityproperty(self,"x");
  int z = getentityproperty(self,"z");
  int y = getentityproperty(self,"y");

  void vEntity;                                       //Target entity placeholder.
  int  iEntity;                                       //Entity enumeration holder.
  char iName;                                         //Entity Name.
  int  iMax      = openborvariant("ent_max");         //Entity count.
  int Disx; int Disz; int Areax; int Areaz;

  //Enumerate and loop through entity collection.
  for(iEntity=0; iEntity<iMax; iEntity++){
    vEntity = getentity(iEntity);                 //Get target entity from current loop.
    iName   = getentityproperty(vEntity, "name"); //Get target name.

    if(iName == "Spaint" && y == 0){
      Disx = x - getentityproperty(vEntity,"x");
      Disz = z - getentityproperty(vEntity,"z");
      Areax = getentityproperty(vEntity,"antigrab")/2;
      Areaz = getentityproperty(vEntity,"grabforce")/2;

      if(Disx < 0){
        Disx = -Disx;
      }

      if(Disz < 0){
        Disz = -Disz;
      }

      if(Disx <= Areax && Disz <= Areaz){
        changeentityproperty(self, "speed", Speed1);
      } else {
        changeentityproperty(self, "speed", Speed2);
      }
    }
  }
}

Usage example:
Code:
@cmd AreaBoost 20 5

This means, if hero is standing on Spaint entity, his/her speed will be 20, otherwise 5

I'm using antigrab and grabforce to define Spaint's length and width respectively. For instance:
Code:
name		Spaint
type		none
antigrab	200
grabforce	100
setlayer	1


anim	idle
	loop	1
	delay	10
	offset	100 50
	frame	data/chars/misc/FoF.png
	frame	data/chars/misc/FoF.png
	frame	data/chars/misc/FoF.png

This means Spaint is 200 pixels long and 100 pixels wide
I've tested this system and it works well :D

I'm aware that you have a solution betterbold but I'm sharing this for alternative solution :)
OTOH this script gives me an idea for expansion and alternate usages  ;D
 
Nice script, BB.
Just avoid to use this:
Code:
int  iMax      = openborvariant("ent_max");         //Entity count.

Use "count_entities" instead.
 
Back
Top Bottom