• All, Gmail is currently rejecting messages from my host. I have a ticket in process, but it may take some time to resolve. Until further notice, do NOT use Gmail for your accounts. You will be unable to receive confirmations and two factor messages to login.

Transformation

the9toe

New member
Hi there,

I remember a topic on Lavalit explaining how to do a Hulk-like transformation. It was suggested to do this via 'weapon'.

In my case it is actually an item the player can pick up and will be transformed into something different.

I was wondering how to limit this transformation time-wise. I don't want the effect be terminated in the end of the level or after getting hit couple of times. Is there the possibility to limit it for let's say 30 sec?

And can Openbor play a transformation animation after the pick up animation? If yes can it be done without script and where do I have to place the command?

A lot of questions... thanks for your help!  ;D
 
I already using a temporary power up made by O Ilusionista, its perfect to make the player invencible for some seconds, but i need to make
player change the color pallete and speed down just for some seconds ( something like poisoned ) and turn back normal after that.

This effect must be trigger touching an item without get animation.

I tested your map demo Bloodbane, its great ;)



 
Alright, I've packed it and you can get it here.

There are 4 status effect items there. 2 are same as ones in Map Demo and the other 2 are Speed Up and Speed Down. Read notes for more details

HTH
 
Bloodbane Thank you so much, all scripts works and its EXTREMELY USEFUL for all openbor comunity.

The slow down script has affects just in walk animation, could it make effect to jump, running and others animations?
 
Y1Wlj2.gif


This is Totoro game,its just for pc, iam making a openbor version to play in some consoles.
There is 2 effects by touch item, the temprary invincible - ok made with iteminv , and the slower affect when
the black cinder ball character is touch , its changes the player speed and color, i need to make this effect.
I dont know for shure, but maybe a temporay trasnformation with weapon could do this effect?

Bloodbane your poison script is wonderful, it can give me the slower effect, but could change the color like this?

Sorry guys im here in the community some years, i learn a lot with you but still noob for scripts and some simple solutions :-[...but i keep trying :)

Thank you for all help....
 
Btw, the mod is functional, just need to make somethings like:

- item get count
- item loss effect ( decreases the item quantity on the counter)
- times up screen
- item animation effect after be touched by player

 
After some trial n errors, I've finally made good script for timed transformation.
I'm sorry but...does not work. Could you look at my code? Could it be a problem that my character has an up and down animation? Should I add a script to "up" and "down"?
name LaDoctor
type none
health 1
speed 8
candamage enemy npc
shadow 0
stealth 1 1
nodrop 2
icon data/chars/Larion/icon.gif
weapnum 4
weaploss 0
jumpheight 0
jumpmove 0

anim spawn
loop 0
delay 100
offset 45 54
bbox 40 34 11 18
@script
void self = getlocalvar("self");

if(frame==2){
setentityvar(self, 1, openborvariant("elapsed_time"));
}
@end_script
frame data/chars/Larion/LaDoctor/Down1.gif
frame data/chars/Larion/LaDoctor/Down1.gif

anim idle
loop 1
delay 14
offset 45 54
bbox 40 34 11 18
@script
void self = getlocalvar("self");
int Weapon = getentityvar(self, 1);
if(Weapon != NULL() && Weapon <= openborvariant("elapsed_time") - 50){
setentityvar(self, 1, NULL());
performattack(self, openborconstant("ANI_FOLLOW1"));
}
@end_script
frame data/chars/Larion/LaDoctor/Down1.gif
frame data/chars/Larion/LaDoctor/Down1.gif
frame data/chars/Larion/LaDoctor/Down1.gif


anim follow1
loop 0
offset 45 54
bbox 40 33 11 20
delay 10
weaponframe 3 0
frame data/chars/Larion/LaDoctor/attack3.gif
frame data/chars/Larion/LaDoctor/attack3.gif
frame data/chars/Larion/LaDoctor/attack3.gif

anim walk
loop 1
delay 13
offset 45 56
bbox 39 33 11 20
@script
void self = getlocalvar("self");
int Weapon = getentityvar(self, 1);
if(Weapon != NULL() && Weapon <= openborvariant("elapsed_time") - 50){
setentityvar(self, 1, NULL());
performattack(self, openborconstant("ANI_FOLLOW1"));
}
@end_script
frame data/chars/Larion/LaDoctor/walk2.gif
frame data/chars/Larion/LaDoctor/walk3.gif
frame data/chars/Larion/LaDoctor/walk4.gif
frame data/chars/Larion/LaDoctor/walk5.gif
frame data/chars/Larion/LaDoctor/walk3.gif
 
didhitscript is one way but I've checked it and there are other ways.

1. Script in GET
If LaDoctor has GET animation, you could declare this script to activate timer script:
Code:
anim get
delay 10
offset 45 54
@script
    if(frame == 1){
      void self = getlocalvar("self");

      setentityvar(self, 1, openborvariant("elapsed_time"));
    }
@end_script
...

GET animation need to have at least 2 frames for this to work.

2. Time stamp setting script in IDLE and WAIT
Extra lines could be added to set time stamp like this:
Code:
anim idle
loop 1
delay 14
offset 45 54
bbox 40 34 11 18
@script
  void self = getlocalvar("self");
  int Weapon = getentityvar(self, 1);

  if(Weapon == NULL()){
    setentityvar(self, 1, openborvariant("elapsed_time"));
    Weapon = openborvariant("elapsed_time");
  }

  if(Weapon != NULL() && Weapon <= openborvariant("elapsed_time") - 50){
    setentityvar(self, 1, NULL());
    performattack(self, openborconstant("ANI_FOLLOW1"));
  }
@end_script
...

anim walk
loop 1
delay 13
offset 45 56
bbox 39 33 11 20
@script
  void self = getlocalvar("self");
  int Weapon = getentityvar(self, 1);

  if(Weapon == NULL()){
    setentityvar(self, 1, openborvariant("elapsed_time"));
    Weapon = openborvariant("elapsed_time");
  }

  if(Weapon != NULL() && Weapon <= openborvariant("elapsed_time") - 50){
    setentityvar(self, 1, NULL());
    changeentityproperty(self, "velocity", 0, 0, 0);
    performattack(self, openborconstant("ANI_FOLLOW1"));
  }
@end_script
...

I've tried this and it works but I have to tell you that 50 in the script is around 25 centiseconds. IOW you'd need to enlarge the value for this transformation to last longer.

HTH
 
Back
Top Bottom