• 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
 
When switching to weapon chars,respawn anim will play if available I'm pretty sure (it's been a while sorry).  This was kind a Nuisance for my mod, that's what I recall.
 
Here's a similar topic I made because I forgot how to do it so I posted this.

http://www.chronocrash.com/forum/index.php?topic=625.msg4606#msg4606
 
There's a script for timer effect but it won't be accurate cause it's possible for player to be in PAIN or FALL animation when timer hits the limit.

On second thought, transforming back during those animation is not good idea so script in IDLE and WALK to timer effect should be sufficient.

I have an idea on how the script would be but I need to find the function to change weapon via script first.
 
Thanks Bloodbane - I'm not in a hurry (unfortunately). My project is developing quite slow - so whenever you find it, let me know. I would be happy as a little girl though  ;)
 
After some trial n errors, I've finally made good script for timed transformation.
Before I start, you need SPAWN for transforming animation and FOLLOW1 for detransforming animation.

Here's the script:
anim spawn
@script
    void self = getlocalvar("self");

    if(frame==2){ //2 is last frame of this animation, you can change it if your animation is longer or shorter
      setentityvar(self, 1, openborvariant("elapsed_time"));
    }
@end_script
...
(define your transformation animation here)

anim follow1
weaponframe 3 0 # 3 is last frame of this animation, you can change it if your animation is longer or shorter
...
(define your detransformation animation here)

anim idle
@script
    void self = getlocalvar("self");
    int Weapon = getentityvar(self, 1);

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

anim walk
@script
    void self = getlocalvar("self");
    int Weapon = getentityvar(self, 1);

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

In my test example, I set 5 seconds and it works. This script is set for 30 seconds transformation.
 
hey man, before start a new topic, i saw this one, and now i made hulk transform only after get low life, which was my initial plan at MFA (like at snes game) thanks bloodbane.
 
I'm using this thread instead of making a new one about it:
I basically want a character to transform into another one after he dies. Example: there are two entities, two different chars, a standing zombie and a crawling/cut in half  zombie. basically I want the zombie to lose his legs (lol) after he dies (after falling from fatal hit and death animation) and just turn into the other entity (the crawling/half trunk one). Is this possible without scripts?
 
Although you want enemy to transform into another one after death, you can make this effect by having enemy to spawn the other enemy on its death

Code:
anim	death
	delay   8
	offset  20 61
	spawnframe 0 0 0 0 0
	custentity LeglessZomb
	frame	data/chars/misc/empty.gif
	frame	data/chars/misc/empty.gif

In this animation, zombie spawns legless zombie on its death

To ensure the zombie plays this animation on death, you need to set death 1 in its header
You also need to set
Code:
load LeglessZomb
to ensure this legless zombie is spawned on death
 
great, gotta try it! thanks

:edit:
the legless zombie spawns from upward (falls from the top of the screen), while it should appear right where the zombie was after playing the death animation :/

I also checked the manual, it seems that summonframe works too as the zombie must spawn only 1 entity, so I used summonframe, but both with spawn and summon the legless zombie just appears from the top of the screen
Code:
anim death
	loop	0
	delay	4
	offset	61 113
custentity legless
summonframe 4 0 0 0 0 0
	frame	data/chars/zombie/death0.gif #legs explode 
	frame	data/chars/zombie/death1.gif   
	frame	data/chars/zombie/death2.gif  
	frame	data/chars/zombie/death3.gif   
	frame	data/chars/zombie/death4.gif #this is when the legless zombie should appear
  	frame	data/chars/zombie/death5.gif #empty frame, zombie disappears to make legless appear
 
I need to make the player character transform after get a item ( just touch, not get), this timed transformation is  around 5 seconds .
In my mod i wish use this script to make the player have some negative status like change the color and get slower during 5 seconds , just
like a penality to touch an item that must not be touched.

 
Oh, for status down effect like that, you don't need transformation. You only need temporary effect :)
I've made temporary powerup and temporary defenseup in Map demo. Download that demo and enter Training Room to see what I mean  8)

I could modify the script to create poison or speed up effect. Give me time to code and wrap it  8)

Use timed transformation if your character is, say transformed into zombie, kappa, moogle or frog (you get the idea).

BTW have you solved your problem with enemy AI?
 
Bloodbane! Thank you so much!

I'll take a look at the map demo.

About the AI problem and platform, i solved it, but probably with the worst way.
I created a entity that no move, its ofset is fixed in the midle of the walkable area
but the sprites of walk animation cover the size of walkable area, the entity walk
animation is the same size of the platform.
Its looks noob, but works... :-[


 
Back
Top Bottom