Help with PARROW.

kdo

Member
I'm having some problems with parrow, its works fine fo player 1 and player 2  but not for player 3 and player 4 , its dont spawns ibn game.
In TMNT by White Dragon, in VS mode, he used scripts to solve this problem, and it workes perfect.

Is thera a way to solve this without acript?

What script should i use to solve this? ( im noob in script, sorry ... :-[)

Thanks!
 
I'm Trying to use your scripts White Dragon, but i'm doing something wrong but i dont know what... just take a look please....

1 - I put the scrpits in script folder.
2 - I put the the  know   parrow1    data/chars/misc/parrow/parrow1.txt    in Models.txt  flag.
3-  I put      data/scripts/parrow.c    in  parrow1.txt  text.
4 - i Put        onspawnscript data/scripts/spawn.c  and  load  parrow1  in my player txt flag.

After all this the engine crashes...  whats wrong?
 
kdo said:
I'm Trying to use your scripts White Dragon, but i'm doing something wrong but i dont know what... just take a look please....

1 - I put the scrpits in script folder.
2 - I put the the  know   parrow1    data/chars/misc/parrow/parrow1.txt    in Models.txt  flag.
3-  I put      data/scripts/parrow.c    in  parrow1.txt  text.
4 - i Put        onspawnscript data/scripts/spawn.c  and  load  parrow1  in my player txt flag.

After all this the engine crashes...  whats wrong?

why do you put      data/scripts/parrow.c    in  parrow1.txt  text? take the parrow1.txt pre-compiled in zip.
BTW:
1) Put the scripts in script folder.
2) Put the the  know   parrow#    data/chars/misc/parrow/parrow#.txt    in Models.txt
3) in your player entity txt write:
load parrow1
load parrow2
load parrow3
load parrow4
onspawnscript data/scripts/spawn.c

It's all ^__^

Ps. re-download the script lib, 'cause I fixed color change func.
 
Thanks again!!!  i did follow your step by step but the engine chrashes anyway, maybe there is some conflict...but i dont know how to fix it.
Take a look    https://mega.nz/#fm/3tkjmCCR
 
kdo said:
Thanks again!!!  i did follow your step by step but the engine chrashes anyway, maybe there is some conflict...but i dont know how to fix it.
Take a look    https://mega.nz/#fm/3tkjmCCR

report log please..

ps. tdownload again and try new lib for you.
 
Thanks for all help you give me ...but  it doesnt work again even with new lib....but ..thanks for all your  atention and suport  White Dragon.
 
I've changed the openbor version , so the parrow default function works for all 4 players , now i'll try your script and magggas scrpit, probably the old engine version didnt suport the script function once i notice that default parrow just wokes for 2 players....but let me see in the new version of the open bor engine...sooner i'll give some feedback and show the log...thanks again...
 
About the position, its ok. the problem is, the player arrow is just displayed when character respawn in the level, i need a permanent player arrow, a parrow to be always dysplayed in game tho show who is who in the  game play.
Is there some way to do this? some script?
 
You can try this entity:

Code:
name PlArrow1
type none
shadow 0
facing 1
setlayer 3000
antigravity      100
subject_to_wall  0
subject_to_obstacle 0
subject_to_platform 0
subject_to_gravity 0
no_adjust_base 1


remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt1.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt2.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt3.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt4.gif

remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt1_1.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt1_2.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt1_3.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt1_4.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt2_1.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt2_2.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt2_3.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt2_4.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt3_1.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt3_2.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt3_3.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt3_4.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt4_1.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt4_2.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt4_3.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt4_4.gif

remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt1_5.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt2_5.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt3_5.gif
remap data/chars/misc/parrow/alt0.gif data/chars/misc/parrow/alt4_5.gif


anim	idle
@script
  if(frame>0){
    void self = getlocalvar("self");
    void Player = getplayerproperty(0, "entity");

    if(Player!=NULL()){
      float Tx = getentityproperty(Player,"x");
      float Ty = getentityproperty(Player,"a");

      changeentityproperty(self, "position", Tx, NULL(), Ty+100); //Teleport!
    } else {
      changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW1"));
    }
  }
@end_script
	loop	1
	delay	2
	offset	15 31
	frame	data/chars/misc/parrow/parrow1.gif
	frame	data/chars/misc/parrow/parrow1.gif
	frame	data/chars/misc/parrow/parrow1.gif
	frame	data/chars/misc/parrow/parrow1.gif
	frame	data/chars/misc/parrow/parrow1.gif
	frame	data/chars/misc/parrow/parrow1b.gif
	frame	data/chars/misc/parrow/parrow1b.gif
	frame	data/chars/misc/parrow/parrow1b.gif
	frame	data/chars/misc/parrow/parrow1b.gif
	frame	data/chars/misc/parrow/parrow1b.gif

anim	follow1
@script
  if(frame>0){
    void self = getlocalvar("self");
    void Player = getplayerproperty(0, "entity");

    if(Player!=NULL()){
      setidle(self, openborconstant("ANI_IDLE"));
    }    
  }
@end_script
	loop	1
	delay	1
	offset	15 31
	frame	data/chars/misc/empty.gif
	frame	data/chars/misc/empty.gif
	frame	data/chars/misc/empty.gif

This is for player 1. For player 2 and others, you can change defined frames and adjust this line:

Code:
    void Player = getplayerproperty(0, "entity");

0 for player 1, 1 for player 2, 2 for player 3 and 3 for player 4

[couple hours later]

I forget to explain some other things.

      changeentityproperty(self, "position", Tx, NULL(), Ty+100);

100 sets relative position of Parrow to respective player. you can adjust this value to suit your need

This parrow works by finding respective player. If it can't find him/her, it simply hides. If it finds him/her, it will stick to him/her with defined range
Because of that, you should spawn all 4 parrows in the level. No need to set 2pspawn etc.

And if you don't want them to spawn mirrored at start of a level, just spawn them offscreen ;)
 
Back
Top Bottom