Welcome, Guest. Please login or register.

What openbor you prefer: Double dragon,battletoads or final fight !? by lirexpatrio
[December 07, 2012, 07:15:27 pm]


what are your favorite games OpenBOR?! by lirexpatrio
[December 07, 2012, 07:09:46 pm]


Post Some Awesome Videos by maxman
[December 07, 2012, 05:51:39 pm]


Can @cmd playmusic "aaaa" 1 also increse music sound ? by BeasTie
[December 07, 2012, 05:24:38 pm]


Streets of Rage: Silent Storm by mtrain
[December 07, 2012, 03:45:05 pm]


Site will be down for maintenance on 12/8/2012 thru 12/10/2012 by Damon Caskey
[December 07, 2012, 07:42:42 am]


Cancelled SOR 3d Remake by riccochet
[December 07, 2012, 03:58:33 am]


Dungeon Fighter: B.O.R. by msmalik681
[December 07, 2012, 03:24:27 am]


[TUTORIAL] How to create 4 Games of OpenBOR in 1 CD (650 MB) by magggas
[December 06, 2012, 09:46:25 pm]


custknife by Bloodbane
[December 06, 2012, 09:34:09 pm]


blockfx help by B.Kardi
[December 06, 2012, 04:09:14 pm]


street of age 4 hd by corradlo
[December 06, 2012, 01:41:36 pm]


ClaFan - Classic Fantasy ver 1.17 by soniczxblade
[December 06, 2012, 05:01:20 am]


Bug Archive by Bloodbane
[December 06, 2012, 02:00:44 am]


"Bio-Doom" and "Gears of Doom" by BulletBob
[December 05, 2012, 10:07:21 pm]


Contra Locked 'N' Loaded v2 by Bloodbane
[December 05, 2012, 09:39:43 pm]


Downloadable OpenBoR Manual by BeasTie
[December 05, 2012, 08:31:24 pm]


Having trouble testing changes by B.Kardi
[December 05, 2012, 03:05:53 pm]


DragonBall Absalon by msmalik681
[December 05, 2012, 02:52:13 pm]


[Hi-Res] Swamp by Vibrant
[December 05, 2012, 10:47:14 am]


  • Dot Guests: 6
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.



Author Topic: Pokemon Rumble 2D Demo  (Read 4984 times)

0 Members and 1 Guest are viewing this topic.

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: Pokemon Rumble 2D Demo
« Reply #30 on: November 27, 2011, 12:00:50 am »
 Why do you add antigravity script?
 Maybe that's the cause of the bug you have now.

 BTW I just think outside the box, if the marker only for marking player, you could use other way such as spawn this marker as type none and bind it to player. As before, the marker's remap is matched to player's number. This way, the marker will always follow or rather stick to player and work better than npc.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline DJGameFreakTheIguana

  • Hero Member
  • *****
  • Posts: 3963
  • Credit to Vyck_St.Judas, Edited by me.
Re: Pokemon Rumble 2D Demo
« Reply #31 on: November 27, 2011, 12:13:27 am »
Why do you add antigravity script?
 Maybe that's the cause of the bug you have now.
I could never find the thing at first, but now that I think about it, not that I have spawn there, I don't really need it.

Quote
BTW I just think outside the box, if the marker only for marking player, you could use other way such as spawn this marker as type none and bind it to player.
Sounds good. I'll try it out.

Quote
As before, the marker's remap is matched to player's number. This way, the marker will always follow or rather stick to player and work better than npc.
I thought it was for matching the players remap, but I'll try it anyway.

EDIT:
I added the bind script and cmd, but now openBOR crashes because of the animations script. This is what I got for marker now:
Code: [Select]
name Marker
type None
shadow 0
#alpha 1
nolife  1
nomove 1

palette       data/chars/effects/Marker

animationscript data/scripts/script.c


anim idle
loop 0
delay 4
offset 113 127
        @cmd bind 1
frame data/chars/effects/Marker.gif
frame data/chars/effects/Marker.gif

anim Spawn
@script
    void self = getlocalvar("self");
    void Parent = getentityproperty(self, "parent");
    int ParIndex = getentityproperty(Parent,"playerindex");

    if(ParIndex==0){
      changeentityproperty(self, "map", 0);
    } else if(ParIndex==1){
      changeentityproperty(self, "map", 1);
    } else if(ParIndex==2){
      changeentityproperty(self, "map", 2);
    } else if(ParIndex==3){
      changeentityproperty(self, "map", 3);
    }
@end_script
loop 0
delay 4
offset 113 127
        @cmd bind 1
frame data/chars/effects/Marker.gif
frame data/chars/effects/Marker.gif

anim Walk
loop 0
delay 4
offset 113 127
        @cmd bind 1
frame data/chars/effects/Marker.gif
frame data/chars/effects/Marker.gif

here's the bind script:
Code: [Select]
void bind(int null, float x, float z, float y, int dir){
void self = getlocalvar("self");
void opp = getentityproperty(self, "opponent");
if(null == 1)
{
bindentity(opp, self, x, z, y, dir, 0);
}
else if(null == 0)
{
bindentity(opp, NULL());
}
}

X)
« Last Edit: November 27, 2011, 12:30:02 am by DJGameFreakTheIguana »

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: Pokemon Rumble 2D Demo
« Reply #32 on: November 27, 2011, 12:56:15 am »
 Of course, it crashed. The bind function you are using is for binding opponent during slam/throw. You need to use other function such as this:
Spoiler
Quote
void spawnMarker(void Name, float dx, float dy, float dz)
{ // Spawn marker, adjust it's remap and bind it
   void self = getlocalvar("self");
    int ParIndex = getentityproperty(self,"playerindex");
   void Spawn;

   Spawn = spawn01(Name, dx, dy, 0);
   bindentity(Spawn, self, dx, dz, dy, 0, 0); // Bind spawned marker

    if(ParIndex==0){
      changeentityproperty(Spawn, "map", 0);
    } else if(ParIndex==1){
      changeentityproperty(Spawn, "map", 1);
    } else if(ParIndex==2){
      changeentityproperty(Spawn, "map", 2);
    } else if(ParIndex==3){
      changeentityproperty(Spawn, "map", 3);
    }
}

void spawn01(void vName, float fX, float fY, float fZ)
{
   //spawn01 (Generic spawner)
   //Damon Vaughn Caskey
   //07/06/2007
   //
   //Spawns entity next to caller.
   //
   //vName: Model name of entity to be spawned in.
   //fX: X location adjustment.
   //fY: Y location adjustment.
      //fZ: Z location adjustment.

   void self = getlocalvar("self"); //Get calling entity.
   void vSpawn; //Spawn object.
   int  iDirection = getentityproperty(self, "direction");

   clearspawnentry(); //Clear current spawn entry.
      setspawnentry("name", vName); //Acquire spawn entity by name.

   if (iDirection == 0){ //Is entity facing left?                 
          fX = -fX; //Reverse X direction to match facing.
   }

      fX = fX + getentityproperty(self, "x"); //Get X location and add adjustment.
      fY = fY + getentityproperty(self, "a"); //Get Y location and add adjustment.
      fZ = fZ + getentityproperty(self, "z"); //Get Z location and add adjustment.
   
   vSpawn = spawn(); //Spawn in entity.

   changeentityproperty(vSpawn, "position", fX, fZ, fY); //Set spawn location.
   changeentityproperty(vSpawn, "direction", iDirection); //Set direction.
   
   return vSpawn; //Return spawn.
}

 Just use spawnMarker BTW.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline DJGameFreakTheIguana

  • Hero Member
  • *****
  • Posts: 3963
  • Credit to Vyck_St.Judas, Edited by me.
Re: Pokemon Rumble 2D Demo
« Reply #33 on: November 27, 2011, 01:35:36 am »
Bare with me Blood, the game is crashing before it even starts now. I only added SpawnMarker to the script and tried to declare it and it didn't work.
Code: [Select]
anim Spawn
@script
   void self = getlocalvar("self");
    int ParIndex = getentityproperty(self,"playerindex");
   void Spawn;

   Spawn = spawn01(Name, dx, dy, 0);
   bindentity(Spawn, self, dx, dz, dy, 0, 0); // Bind spawned marker

    if(ParIndex==0){
      changeentityproperty(Spawn, "map", 0);
    } else if(ParIndex==1){
      changeentityproperty(Spawn, "map", 1);
    } else if(ParIndex==2){
      changeentityproperty(Spawn, "map", 2);
    } else if(ParIndex==3){
      changeentityproperty(Spawn, "map", 3);
    }
@end_script
loop 0
delay 4
offset 113 127
frame data/chars/effects/Marker.gif
frame data/chars/effects/Marker.gif

Also, I already have Spawn01 cause I copied script.C from Sega Brawlers to use for the battle effects. I'll attach the whole file below.

x)

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: Pokemon Rumble 2D Demo
« Reply #34 on: November 28, 2011, 11:37:57 pm »
 That's because this function is meant to be called from animationscript not directly like this. Try to put this function in an animationscript and call it with @cmd.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline DJGameFreakTheIguana

  • Hero Member
  • *****
  • Posts: 3963
  • Credit to Vyck_St.Judas, Edited by me.
Re: Pokemon Rumble 2D Demo
« Reply #35 on: November 28, 2011, 11:48:48 pm »
I tried that before but then BOR crashing saying "There's an exception while executing script 'animationscript'." I think i just put it by itself, so tried adding a 1 to it:
Code: [Select]
anim Spawn
loop 0
delay 4
offset 113 127
        @cmd spawnMarker 1
frame data/chars/effects/Marker.gif
frame data/chars/effects/Marker.gif
I still got the same message. If it helps, I'll attach the scriptlog.

X)

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: Pokemon Rumble 2D Demo
« Reply #36 on: November 29, 2011, 12:16:28 am »
 spawnMarker requires 4 parameters to be filled in just like spawn01. The 1st is the name of entity to be the marker while the rest is coordinate relative to spawner in x, y and z respectively.

 BTW this script should be run by player not by the marker itself.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline DJGameFreakTheIguana

  • Hero Member
  • *****
  • Posts: 3963
  • Credit to Vyck_St.Judas, Edited by me.
Re: Pokemon Rumble 2D Demo
« Reply #37 on: November 29, 2011, 12:34:41 am »
OH man, I was still running that script on Marker because of the color thing.  :dunce:

OK, I called it, put the name down and digits, made color palettes for the marker, and it worked(check attachments)
Thanks for the Blood. I think I'm gonna change those dots to color rings though.

X)

 



 0%




SimplePortal 2.3.3 © 2008-2010, SimplePortal