Neon Lightning Force

Complete Neon Lightning Force 2025-09-29

No permission to download
Project is completed.
But someone knows how to make the bullets bounce when robots are shooted? Did I have to spawns "bullets" entities using the takedamagescript and the attack types?

The best way is to use didhitscript on the bullets. When a bullet hit certain enemies, it tosses "bullet" back.
Detecting those enemies might need small trick such as defense setting. You could set say defense normal 0.9 to robots which if detected by the bullet, it will do the aforementioned stuffs. The difference is small so it won't impact much on regular beating though.

By the way, does anyone know how to make an enemy "auto move" to a certain x/z location in the stage, like the player (Steven) did at the end of the video? (I need help with that -_-).

You could use targetting script preferably the time based one and instead of targetting opponent, the script targets specific coords.
Like this function:
C:
void targetPos(int Time, int Tx, int Ty, int Tz, int Flip, int Flag)
{// Targetting defined position before leaping or dashing. Time Based.
// Time = Time to reach destination
// Tx = Destined x coordinate
// Ty = Destined y coordinate
// Tz = Destined z coordinate
// Flip = flag to flip to target or not, 0 = no change, 1 = flip
// Flag = flag to choose relative to screen or absolute, 0 = absolute, 1 = screen
    void self = getlocalvar("self");
    float x = getentityproperty(self, "x");
    float y = getentityproperty(self, "y");
    float z = getentityproperty(self, "z");
    int XPos = openborvariant("xpos"); //Get screen edge's position
    float Vx, Vy, Vz, Sy;

    if(Flag == 1){
      Tx = Tx+XPos;
    }

    if(Time == 0){
      Time = 1;
    } else if(Time < 0){
      Time = -Time;
    }

    if(Flip == 1){
      if(Tx < x){
        changeentityproperty(self, "direction", 0);
      } else {
        changeentityproperty(self, "direction", 1);
      }
    }
    Sy = Ty - y;
    Vy = 0.05*Time + Sy/Time;
    Vx = (Tx-x)/Time;
    Vz = (Tz-z)/Time;

    setlocalvar("x"+self, Vx);
    setlocalvar("y"+self, Vy);
    setlocalvar("z"+self, Vz);
}

You use dash function after that function like in regular targetted attack.
 
Hi to everyone, the here is a beta version of the game (In fact it's the full game)
But it's messy with small glitches that I can't solve x.x.


Download Full Game (Beta)

Ok, here are the bugs I coun't solve for this version:

1. - It's posible to create a weapon and give it to enemy with scripts? Spawn entities wielding weapons (not "weaponframe {frame} {weapon}", not "weapon {name} {bi}").
Just using the spawn script ?:

C:
void spawn01(void vName, float fX, float fY, float fZ, int parent, int indexedvar)
{
  //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.
  //Modified by Crimsondeath xd

  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.

  if(parent==1){
    void CandamageP  = getentityproperty(self, "candamage");
    void HostileP  = getentityproperty(self, "candamage");

    changeentityproperty(vSpawn, "candamage", CandamageP);
    changeentityproperty(vSpawn, "hostile", HostileP);
  }
  if(indexedvar){
    setindexedvar(indexedvar, vSpawn);
  }
 
  return vSpawn; //Return spawn.
}

2.- It's posible that the "Hits" have independent sounds effects ( "hitfx {path}" ) ? For example when a Knife hit an enemy it's sounds like cutting flesh even if it hits a robot enemy or obstacle.

3.- It's possible to customize the parrow (parrow {path} {x} {y}) with scripts conditions?
TytCGwn.jpeg


4.- And yes I'm having trouble with the TargetPos script while leaping x.x
TtmszfR.jpeg

GnWFI2S.jpeg


It just that the entities never reach the "position" I want even if I use the propers "x", "y" and "z" coords x.x.

Koga's jump code:
Code:
anim    follow10
    loop    0
    offset    35 114
    delay    4
    landframe    4
    @cmd    antiGravityE 0
    @cmd    subjectminz 0
    @cmd    targetPos 70 150 0 643 0 0
    frame    data/chars/koga/rise1.gif
    delay    7
    offset    60 154
    @cmd    leap 5
    frame    data/chars/koga/jump0.gif
    frame    data/chars/koga/jump1.gif
    delay    1000
    frame    data/chars/koga/jump2.gif
    offset    35 114
    delay    4
    frame    data/chars/koga/rise1.gif
    delay    1
    offset    53 150
    @cmd    flip 1
    frame    data/chars/koga/attack1c.gif
    delay    -1
    frame    data/chars/koga/attack1c.gif

Iga's jump code:
Code:
anim    follow10
    loop    0
    delay    7
    landframe    7
    offset    40 68
    @cmd    targetPos 140 500 0 643 0 0
    @cmd    subjectminz 0
    frame    data/chars/iga/rise2.gif
    offset    44 133
    @cmd    leap 3
    frame    data/chars/iga/jump1b.gif
    frame    data/chars/iga/jump1c.gif
    frame    data/chars/iga/jump1d.gif
    frame    data/chars/iga/jump1e.gif
    frame    data/chars/iga/jump1f.gif
    delay    1000
    frame    data/chars/iga/jump1g.gif
    delay    14
    offset    40 68
    frame    data/chars/iga/rise2.gif
    delay    1
    offset    19 104
    @cmd    flip 0
    frame    data/chars/iga/idle.gif
    delay    -1
    frame    data/chars/iga/idle.gif
(I think I need another year to finish this 😭)
 
Last edited:
2.- It's posible that the "Hits" have independent sounds effects ( "hitfx {path}" ) ? For example when a Knife hit an enemy it's sounds like cutting flesh even if it hits a robot enemy or obstacle.
You can do this by giving didhitscript to the projectile or the one with an attacking knife, as well as giving an empty sound with hitfx.

Code:
name Hadouken
type trap
remove 1
nolife 1
alpha 1
shadow 0
hostile enemy player trap npc
candamage player enemy npc trap
setlayer 300
offscreenkill 69
subject_to_gravity 0

animationscript data/scripts/special.c
didhitscript data/scripts/projectilehit.c

anim idle
@script
    void self = getlocalvar("self");
    //changeentityproperty(self, "name", "Ryu");
    changeentityproperty(self, "candamage", openborconstant("TYPE_ENEMY"), openborconstant("TYPE_PLAYER"), openborconstant("TYPE_NPC"), openborconstant("TYPE_TRAP"));
@end_script
    delay 2
    offset 98 103
    loop 1 1
    platform 1 1 1 1 1 1 1 1
    attack17 100 88 28 28 15 0 0 1 0 0
    dropv 3.4 3 0
    hitfx data/sounds/empty.wav
    bbox 100 88 28 28
    followanim 1
    followcond 1
    sound data/chars/misc/hadoken/sp1a.wav
    frame data/chars/misc/hado/hadou00.png
    frame data/CHARS/misc/Hado/hadou01.png
    frame data/CHARS/misc/Hado/hadou02.png
    frame data/CHARS/misc/Hado/hadou03.png
    frame data/CHARS/misc/Hado/hadou04.png
    frame data/CHARS/misc/Hado/hadou05.png
    frame data/CHARS/misc/Hado/hadou06.png
    frame data/CHARS/misc/Hado/hadou07.png
    frame data/CHARS/misc/Hado/hadou08.png
    frame data/CHARS/misc/Hado/hadou09.png
    frame data/chars/misc/hado/hadou00.png

anim follow1
    delay 2
    offset 98 103
    @cmd stop
    frame data/CHARS/misc/Hado/hadospx00.png
    frame data/CHARS/misc/Hado/hadospx01.png
    frame data/CHARS/misc/Hado/hadospx02.png
    frame data/CHARS/misc/Hado/hadospx03.png
    frame data/CHARS/misc/Hado/hadospx04.png
    frame data/CHARS/misc/Hado/hadospx05.png
    frame data/CHARS/misc/Hado/hadospx06.png
    frame data/CHARS/misc/Hado/hadospx07.png
    frame data/CHARS/misc/Hado/hadospx08.png
    frame data/CHARS/misc/Hado/hadospx09.png
    frame data/CHARS/misc/Hado/hadospx10.png
    frame data/CHARS/misc/Hado/hadospx11.png
    frame data/CHARS/misc/Hado/hadospx12.png
    frame data/CHARS/misc/Hado/hadospx13.png
    frame data/CHARS/misc/Hado/hadospx14.png
    frame data/CHARS/misc/Hado/hadospx15.png
    move 10000
    frame data/CHARS/misc/Hado/hadospx15.png

C:
void main(){
    
    //Projectile hitting certain entity types with hit effects
    //A role play as hitfx
    
    void self = getlocalvar("self");
    void target = getentityproperty(self, "opponent");
    int x = getentityproperty(self, "x");
    int z = getentityproperty(self, "z");
    int y = getentityproperty(self, "y");
    void Type = getentityproperty(target, "type");
    void Beat = loadsample("data/sounds/common/beat3.wav");
    void Spawn;
    
    if(Type == openborconstant("TYPE_PLAYER") || Type == openborconstant("TYPE_ENEMY")){
        // Players or enemies
        playsample(Beat, 0, 100, 100, 0, 0);
        clearspawnentry();
        loadmodel("specflash");
        setspawnentry("name", "specflash");
        Spawn = spawn();
        changeentityproperty(Spawn, "position", x, z, y);
    }
}

However, for your case on damaging specific enemy with their own names, you can give a didhitscript to the one holding the knife to attack. Give it hitfx with an empty sound but give a new sound in didhitscript on which entity you are going to attack.

I don't know what to rename it, but I just call it knifeatk.c for now. Declare it with didhitscript for your weapon character.

knifeatk.c:
C:
void main(){
    
    //Projectile hitting certain entity types with hit effects
    //A role play as hitfx
    
    void self = getlocalvar("self"); // Call self
    void target = getentityproperty(self, "opponent"); // Call opponent
    void tName = getentityproperty(target, "defaultname"); // Opponent's default name
    void Type = getentityproperty(target, "type");
    void Beat = loadsample("data/sounds/beat3.wav");
    void RoboBeat = loadsample("data/sounds/mayday.wav");
    void Box = loadsample("data/sounds/crack.wav");
    void specialBox = loadsample("data/sounds/smoke.wav");
    
    if(tName == "Robot" || tName == "Robot2"){
        //Robot injure?
        playsample(RoboBeat, 0, 100, 100, 0, 0);
    }else if(tName == "Soldiau" || tName == "Bodyguard" || tName == "Jopei"){
        //Flesh injure?
        playsample(Beat, 0, 100, 100, 0, 0);
    }else if(Type == openborconstant("TYPE_OBSTACLE")){
        //Box destroyed?
        playsample(Box, 0, 100, 100, 0, 0);
    }else if(tName == "Special_Box"){
        //Special box destroyed?
        playsample(specialBox, 0, 100, 100, 0, 0);
    }
}

I'm in a hurry so I gotta go.
 
3.- It's possible to customize the parrow (parrow {path} {x} {y}) with scripts conditions?

I think it would be better to just create custom parrow with script. AFAIK this arrow only appear during respawn so just add RESPAWN animation and spawn the arrow in that animation. The arrow would be bound to player until its lifespan is 0.
With that set, you could add script conditions for this arrow.

4.- And yes I'm having trouble with the TargetPos script while leaping x.x

You're using the same TargetPos I've shared before right?
Anyways, I've just remembered something, that function is coded with assumption that both entities and levels use default gravity. If any of them has less or more gravity power, the function won't work properly. So is Iga and Koga using different gravity power?
 
@maxman: Thanks a lot! It works like a Charm! :D

@Bloodbane: Thank you, I have fixed the leap jump, but using "position" xd. They jump straight up until they are offscren them they are teleport to the x and z position ending their jump right where I wanted. The "parrow" it's not so important but thanks for the info, I'll try it if I can.

I have updated the beta fixing some those bugs. Thanks :D.
 
Back
Top Bottom