Solved This is a projectile palette question.

Question that is answered or resolved.

DD Tokki

Well-known member
KoR - 0082.png

C:
name         06MOB-C
type             none
nomove        1
shadow        0

script         data/scripts/06m.c

palette        data/sprites/sprite/chara/06m/Idle-01.gif

alternatepal     data/sprites/sprite/chara/06m/Alt-01.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-02.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-03.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-04.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-05.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-06.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-07.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-08.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-09.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-10.gif

anim    idle
    drawmethod    remap -1
    frame       none
    offset    20 90
    frame    data/sprites/sprite/chara/06m/maryob-c01.gif
    frame    data/sprites/sprite/chara/06m/maryob-c01.gif
    offset    2 88
    frame    data/sprites/sprite/chara/06m/maryob-c02.gif
    offset    -5 88
    frame    data/sprites/sprite/chara/06m/maryob-c03.gif
    frame       none

Creating the Blue Mary's slam attack.
Here, the body goes backwards and the arm sprite is separated into layers, so the arm is displayed forward while holding the enemy.
So, I made the arm into a projectile, but since the color of the body and the color of the projectile are separate, I would like to ask if it is possible to match the color of the projectile accordingly whenever the color of the body changes.
The palette uses the same thing as the body and projectile.
 
Last edited:
If you take a look at the palettes from both Spawn and one of his projectiles from Ultimate Double Dragon, the child entity has the same palettes as its parent. Plus, take a look at their color tables if they are the same. If not, their colors are separate from each other.

Spawn (parent):
Code:
name          ess
candamage     enemy obstacle pshot npc
running       12 2.2 1.5 1 0
type          player
subject_to_obstacle 0
health        100
mp            100
falldie       2
jugglepoints  15
chargerate    5
speed         7
throw         2 3
throwdamage   20
holdblock     1
jumpheight    2.43
jumpspeed     8
grabdistance  35
shadow        0
gfxshadow     1
noquake       1
makeinv       1
nodieblink    1
antigravity   40
atchain       1 1 2 3 0
riseinv       1
weapons       none none none none none none none none none none none
#weaploss      2
#parrow          data/chars/1dra/parrow.gif -39 -90
#parrow2      data/chars/1dra/parrow.gif -39 -90
icon          data/chars/misc/ess/icon.gif 1
#parrow        
#parrow2

script data/scripts/spawn.c
animationscript   data/scripts/lib001.c
ondrawscript      data/scripts/shadowon.c
#didhitscript      data/scripts/didhit.c
onblockWscript         data/scripts/spikesw2.c

com           a2    freespecial1
com           a3    freespecial4
com           a4    freespecial5

fmap           10
hmap           10 11
palette        data/chars/misc/ess/alter01.gif  
alternatepal   data/chars/misc/ess/alter02.gif  
alternatepal   data/chars/misc/ess/alter03.gif  
alternatepal   data/chars/misc/ess/alter04.gif  
alternatepal   data/chars/misc/ess/alter05.gif  
alternatepal   data/chars/misc/ess/alter06.gif  
alternatepal   data/chars/misc/ess/alter07.gif  
alternatepal   data/chars/misc/ess/alter08.gif  
alternatepal   data/chars/misc/ess/alter09.gif  
alternatepal   data/chars/misc/ess/alter10.gif
alternatepal   data/chars/misc/ess/alterfr.gif
alternatepal   data/chars/misc/ess/alterbr.gif

Code:
anim follow18
     loop       0
     delay      1
     offset     80 129
     bbox       0
     load       essbloo
     load       slow
     load       quake02
     load       xr01
     load       xr02
     load       xr03
     landframe  44
     custentity xr01
     spawnframe 8 0 0 0 0
@cmd setmusicvolume 05 05                ############ music going silent
@cmd velo001 0
@cmd slamstart2
@cmd antiwall2 36 -37 0
@cmd position 36 30 1 -0.1 0
         frame      data/chars/misc/ess/tel07.gif
@cmd position 2 30 1 -0.1 0
     delay      4
         frame      data/chars/misc/ess/tel06.gif
         frame      data/chars/misc/ess/tel05.gif
         frame      data/chars/misc/ess/tel04.gif
         frame      data/chars/misc/ess/tel03.gif
         frame      data/chars/misc/ess/tel02.gif
         frame      data/chars/misc/ess/tel01.gif
     offset     85 129
@cmd position 5 30 1 -0.1 0
         frame      data/chars/misc/ess/th04.gif
     sound      data/chars/misc/ess/essxr1.wav
     delay      50
     offset     80 129
         frame      data/chars/misc/ess/empty.gif
     delay      7
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 45 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif   #10
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 55 0 0
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 40 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 35 0 0
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 45 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
     sound      data/chars/misc/ess/essx1.wav
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 40 0 0
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 55 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 45 0 0  
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 55 0 0  
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 40 0 0  
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 45 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif   #20
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 55 0 0
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 40 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 35 0 0
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 45 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 40 0 0
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 45 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
     delay      49 #21+28
@cmd position 8 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "xr02" "xr02" 0 0 0 0 0
     delay      60
@cmd position 8 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
     delay      8
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
         sound      data/sounds/beatswd1.wav
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 45 0 0
     delay      6
@cmd position 9 30 -5 -0.1 0
         frame      data/chars/misc/ess/empty.gif  #30
     delay      21
@cmd position 12 30 -1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
     sound      data/chars/misc/ess/essx2.wav
@cmd spawn001 "slow" "slow" 0 0 0 0 0
@cmd spawn001 "essbloo" "essbloo" 0 38 0 1 0
     delay      6
@cmd position 11 30 -1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
         sound      data/sounds/beatswd8.wav
@cmd spawn001 "essbloo" "essbloo" 0 33 0 1 0
@cmd position 12 30 -1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd position 11 30 -1 -0.1 0
          frame      data/chars/misc/ess/empty.gif
     delay      45
@cmd position 12 30 -1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
     delay      5
@cmd position 12 30 -1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "xr03" "xr03" 0 0 0 -1 0
     delay      14
@cmd position 12 30 -1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
         sound      data/sounds/beatswd7.wav
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 3 0 0
     delay      7
@cmd position 11 30 -1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "essbloo" "essbloo" 0 30 15 1 0
@cmd position 11 30 3 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "essbloo" "essbloo" 0 30 23 1 0
@cmd position 9 30 10 -0.1 0
         frame      data/chars/misc/ess/empty.gif   #40
     delay      19
@cmd spawn001 "essbloo" "essbloo" 0 30 40 1 0
@cmd position 9 30 35 -0.1 0
         frame      data/chars/misc/ess/empty.gif
         sound      data/sounds/grab.wav
@cmd move 15 0 50
     delay      1
     offset     80 134
@cmd position 11 0 -5 -0.1 0
         frame      data/chars/misc/ess/xr33.gif
@cmd move 0 0 0
     delay      49
     offset     80 129
         frame      data/chars/misc/ess/xr33.gif
@cmd velo001 0 0 -1.5
     delay      999
         frame      data/chars/misc/ess/xr33.gif  #44
     sound      data/chars/misc/ess/essw3.wav
     delay      4
@cmd spawn001 "slow" "slow" 0 0 0 0 0
@cmd spawn001 "essfla" "essfla" 0 15 0 1 0
@cmd spawn001 "quake02" "quake02" 0 0 0 0 0
@cmd position 12 0 -1 -0.1 0
         frame      data/chars/misc/ess/xr34.gif
     sound      data/chars/misc/ess/essx3.wav
@cmd spawn001 "quake02" "quake02" 0 0 0 0 0
         frame      data/chars/misc/ess/xr35.gif
     sound      data/chars/misc/ess/essw2.wav
@cmd spawn001 "quake02" "quake02" 0 0 0 0 0
         frame      data/chars/misc/ess/xr36.gif
@cmd spawn001 "quake02" "quake02" 0 0 0 0 0
         frame      data/chars/misc/ess/xr37.gif
@cmd spawn001 "quake02" "quake02" 0 0 0 0 0
     delay      34
         frame      data/chars/misc/ess/xr38.gif
     delay      1
@cmd position 12 7 0 0 0
         frame      data/chars/misc/ess/xr38.gif
     delay      6
@cmd velo001 -0.9 0 0
@cmd depost 0
@cmd finish 75 13 -0.9 2.5 0 0
@cmd setmusicvolume 100 100            ############ music going normal
         frame      data/chars/misc/ess/ap09.gif
         frame      data/chars/misc/ess/ap08.gif
         frame      data/chars/misc/ess/ju06.gif
         frame      data/chars/misc/ess/ju05.gif
     delay      12
@cmd velo001 0 0 0
         frame      data/chars/misc/ess/land.gif

Here's one of his projectiles that has the same palette as the parent.

Code:
name    xr01
type    none
subject_to_hole 0
subject_to_obstacle 0
subject_to_platform 1
subject_to_gravity 0
subject_to_wall 1
no_adjust_base 1


animationscript   data/scripts/lib001.c
onspawnscript     data/scripts/projpal.c

palette        data/chars/misc/ess/alter01.gif  
alternatepal   data/chars/misc/ess/alter02.gif  
alternatepal   data/chars/misc/ess/alter03.gif  
alternatepal   data/chars/misc/ess/alter04.gif  
alternatepal   data/chars/misc/ess/alter05.gif  
alternatepal   data/chars/misc/ess/alter06.gif  
alternatepal   data/chars/misc/ess/alter07.gif  
alternatepal   data/chars/misc/ess/alter08.gif  
alternatepal   data/chars/misc/ess/alter09.gif  
alternatepal   data/chars/misc/ess/alter10.gif  


anim idle
@script
    void self = getlocalvar("self");

    if(frame==1){
      changeentityproperty(self, "subject_to_gravity", 1);
      changeentityproperty(self, "subject_to_wall", 0);
    }
    if(frame==7){
      changeentityproperty(self, "subject_to_gravity", 0);
    }
    if(frame==46){
      changeentityproperty(self, "subject_to_gravity", 1);
    }
@end_script
     loop       0
     delay      7
     offset     80 129
     bbox       0
     jumpframe  2 3 -0.3 0
     dropframe  7
         frame      data/chars/misc/ess/xr01.gif
         frame      data/chars/misc/ess/xr02.gif
     delay      6
         frame      data/chars/misc/ess/xr03.gif
         frame      data/chars/misc/ess/xr04.gif
         frame      data/chars/misc/ess/xr05.gif
         frame      data/chars/misc/ess/xr06.gif
     delay      999
         frame      data/chars/misc/ess/xr07.gif
     delay      7
@cmd jump001 0.1 0 0
@cmd velo001 0 0 0
         sound      data/chars/misc/ess/mchgun.wav
         frame      data/chars/misc/ess/xr08.gif
         frame      data/chars/misc/ess/xr09.gif
         sound      data/chars/misc/ess/essw4.wav
         frame      data/chars/misc/ess/xr08.gif          #10
         frame      data/chars/misc/ess/xr09.gif
         sound      data/chars/misc/ess/mchgun.wav
         frame      data/chars/misc/ess/xr08.gif
         frame      data/chars/misc/ess/xr09.gif
         sound      data/chars/misc/ess/mchgun.wav
         frame      data/chars/misc/ess/xr08.gif
         frame      data/chars/misc/ess/xr09.gif
         frame      data/chars/misc/ess/xr08.gif
         frame      data/chars/misc/ess/xr09.gif
         frame      data/chars/misc/ess/xr08.gif
         frame      data/chars/misc/ess/xr09.gif
         frame      data/chars/misc/ess/xr08.gif   #20
         frame      data/chars/misc/ess/xr09.gif
         frame      data/chars/misc/ess/xr08.gif
         frame      data/chars/misc/ess/xr09.gif
         frame      data/chars/misc/ess/xr08.gif
         frame      data/chars/misc/ess/xr09.gif
     delay      7
         frame      data/chars/misc/ess/xr10.gif
         frame      data/chars/misc/ess/xr11.gif
         frame      data/chars/misc/ess/xr12.gif
     delay      15
         frame      data/chars/misc/ess/xr13.gif
     delay      7
         frame      data/chars/misc/ess/xr14.gif    #30
         frame      data/chars/misc/ess/xr15.gif
         frame      data/chars/misc/ess/xr16.gif
     delay      40
         frame      data/chars/misc/ess/xr17.gif
     delay      6
         frame      data/chars/misc/ess/xr18.gif
     delay      30
         frame      data/chars/misc/ess/xr19.gif
     delay      6
         frame      data/chars/misc/ess/xr20.gif
         frame      data/chars/misc/ess/xr21.gif
         frame      data/chars/misc/ess/xr22.gif
         frame      data/chars/misc/ess/xr23.gif
     delay      55
         frame      data/chars/misc/ess/xr24.gif    #40
     delay      6
         frame      data/chars/misc/ess/xr25.gif
         frame      data/chars/misc/ess/xr26.gif
         frame      data/chars/misc/ess/xr27.gif
         frame      data/chars/misc/ess/xr28.gif
         frame      data/chars/misc/ess/xr29.gif
         frame      data/chars/misc/ess/xr30.gif
     delay      8
@cmd jump001 0.8 1.1 0 0
         frame      data/chars/misc/ess/xr31.gif
         frame      data/chars/misc/ess/xr32.gif




    @cmd killentity getlocalvar("self")
     frame     data/chars/0misc/empty.gif

For the projectile spawning, declare it as onspawnscript (if you look above).

projpal.c:
C:
void main(){
    changePalette();
}

void changePalette(){
    void self = getlocalvar("self");
    void parent = getentityproperty(self, "parent");
    int Pmap = getentityproperty(parent, "map");

    if(Pmap){
        changeentityproperty(self, "map", Pmap);
    }
}

Does that arm entity from Mary have equally the same color table as her?

I did help Mr. Q with this, so I had to do one Street Fighter character for spawning projectiles that have the same palette and same color table as the parent first.
 
If you take a look at the palettes from both Spawn and one of his projectiles from Ultimate Double Dragon, the child entity has the same palettes as its parent. Plus, take a look at their color tables if they are the same. If not, their colors are separate from each other.

Spawn (parent):
Code:
name          ess
candamage     enemy obstacle pshot npc
running       12 2.2 1.5 1 0
type          player
subject_to_obstacle 0
health        100
mp            100
falldie       2
jugglepoints  15
chargerate    5
speed         7
throw         2 3
throwdamage   20
holdblock     1
jumpheight    2.43
jumpspeed     8
grabdistance  35
shadow        0
gfxshadow     1
noquake       1
makeinv       1
nodieblink    1
antigravity   40
atchain       1 1 2 3 0
riseinv       1
weapons       none none none none none none none none none none none
#weaploss      2
#parrow          data/chars/1dra/parrow.gif -39 -90
#parrow2      data/chars/1dra/parrow.gif -39 -90
icon          data/chars/misc/ess/icon.gif 1
#parrow       
#parrow2

script data/scripts/spawn.c
animationscript   data/scripts/lib001.c
ondrawscript      data/scripts/shadowon.c
#didhitscript      data/scripts/didhit.c
onblockWscript         data/scripts/spikesw2.c

com           a2    freespecial1
com           a3    freespecial4
com           a4    freespecial5

fmap           10
hmap           10 11
palette        data/chars/misc/ess/alter01.gif 
alternatepal   data/chars/misc/ess/alter02.gif 
alternatepal   data/chars/misc/ess/alter03.gif 
alternatepal   data/chars/misc/ess/alter04.gif 
alternatepal   data/chars/misc/ess/alter05.gif 
alternatepal   data/chars/misc/ess/alter06.gif 
alternatepal   data/chars/misc/ess/alter07.gif 
alternatepal   data/chars/misc/ess/alter08.gif 
alternatepal   data/chars/misc/ess/alter09.gif 
alternatepal   data/chars/misc/ess/alter10.gif
alternatepal   data/chars/misc/ess/alterfr.gif
alternatepal   data/chars/misc/ess/alterbr.gif

Code:
anim follow18
     loop       0
     delay      1
     offset     80 129
     bbox       0
     load       essbloo
     load       slow
     load       quake02
     load       xr01
     load       xr02
     load       xr03
     landframe  44
     custentity xr01
     spawnframe 8 0 0 0 0
@cmd setmusicvolume 05 05                ############ music going silent
@cmd velo001 0
@cmd slamstart2
@cmd antiwall2 36 -37 0
@cmd position 36 30 1 -0.1 0
         frame      data/chars/misc/ess/tel07.gif
@cmd position 2 30 1 -0.1 0
     delay      4
         frame      data/chars/misc/ess/tel06.gif
         frame      data/chars/misc/ess/tel05.gif
         frame      data/chars/misc/ess/tel04.gif
         frame      data/chars/misc/ess/tel03.gif
         frame      data/chars/misc/ess/tel02.gif
         frame      data/chars/misc/ess/tel01.gif
     offset     85 129
@cmd position 5 30 1 -0.1 0
         frame      data/chars/misc/ess/th04.gif
     sound      data/chars/misc/ess/essxr1.wav
     delay      50
     offset     80 129
         frame      data/chars/misc/ess/empty.gif
     delay      7
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 45 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif   #10
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 55 0 0
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 40 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 35 0 0
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 45 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
     sound      data/chars/misc/ess/essx1.wav
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 40 0 0
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 55 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 45 0 0 
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 55 0 0 
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 40 0 0 
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 45 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif   #20
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 55 0 0
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 40 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 35 0 0
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 45 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 40 0 0
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 45 0 0
@cmd position 1 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
     delay      49 #21+28
@cmd position 8 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "xr02" "xr02" 0 0 0 0 0
     delay      60
@cmd position 8 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
     delay      8
@cmd position 2 30 1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
         sound      data/sounds/beatswd1.wav
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 45 0 0
     delay      6
@cmd position 9 30 -5 -0.1 0
         frame      data/chars/misc/ess/empty.gif  #30
     delay      21
@cmd position 12 30 -1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
     sound      data/chars/misc/ess/essx2.wav
@cmd spawn001 "slow" "slow" 0 0 0 0 0
@cmd spawn001 "essbloo" "essbloo" 0 38 0 1 0
     delay      6
@cmd position 11 30 -1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
         sound      data/sounds/beatswd8.wav
@cmd spawn001 "essbloo" "essbloo" 0 33 0 1 0
@cmd position 12 30 -1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd position 11 30 -1 -0.1 0
          frame      data/chars/misc/ess/empty.gif
     delay      45
@cmd position 12 30 -1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
     delay      5
@cmd position 12 30 -1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "xr03" "xr03" 0 0 0 -1 0
     delay      14
@cmd position 12 30 -1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
         sound      data/sounds/beatswd7.wav
@cmd spawn001 "Qflash2b" "Qflash2b" 0 30 3 0 0
     delay      7
@cmd position 11 30 -1 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "essbloo" "essbloo" 0 30 15 1 0
@cmd position 11 30 3 -0.1 0
         frame      data/chars/misc/ess/empty.gif
@cmd spawn001 "essbloo" "essbloo" 0 30 23 1 0
@cmd position 9 30 10 -0.1 0
         frame      data/chars/misc/ess/empty.gif   #40
     delay      19
@cmd spawn001 "essbloo" "essbloo" 0 30 40 1 0
@cmd position 9 30 35 -0.1 0
         frame      data/chars/misc/ess/empty.gif
         sound      data/sounds/grab.wav
@cmd move 15 0 50
     delay      1
     offset     80 134
@cmd position 11 0 -5 -0.1 0
         frame      data/chars/misc/ess/xr33.gif
@cmd move 0 0 0
     delay      49
     offset     80 129
         frame      data/chars/misc/ess/xr33.gif
@cmd velo001 0 0 -1.5
     delay      999
         frame      data/chars/misc/ess/xr33.gif  #44
     sound      data/chars/misc/ess/essw3.wav
     delay      4
@cmd spawn001 "slow" "slow" 0 0 0 0 0
@cmd spawn001 "essfla" "essfla" 0 15 0 1 0
@cmd spawn001 "quake02" "quake02" 0 0 0 0 0
@cmd position 12 0 -1 -0.1 0
         frame      data/chars/misc/ess/xr34.gif
     sound      data/chars/misc/ess/essx3.wav
@cmd spawn001 "quake02" "quake02" 0 0 0 0 0
         frame      data/chars/misc/ess/xr35.gif
     sound      data/chars/misc/ess/essw2.wav
@cmd spawn001 "quake02" "quake02" 0 0 0 0 0
         frame      data/chars/misc/ess/xr36.gif
@cmd spawn001 "quake02" "quake02" 0 0 0 0 0
         frame      data/chars/misc/ess/xr37.gif
@cmd spawn001 "quake02" "quake02" 0 0 0 0 0
     delay      34
         frame      data/chars/misc/ess/xr38.gif
     delay      1
@cmd position 12 7 0 0 0
         frame      data/chars/misc/ess/xr38.gif
     delay      6
@cmd velo001 -0.9 0 0
@cmd depost 0
@cmd finish 75 13 -0.9 2.5 0 0
@cmd setmusicvolume 100 100            ############ music going normal
         frame      data/chars/misc/ess/ap09.gif
         frame      data/chars/misc/ess/ap08.gif
         frame      data/chars/misc/ess/ju06.gif
         frame      data/chars/misc/ess/ju05.gif
     delay      12
@cmd velo001 0 0 0
         frame      data/chars/misc/ess/land.gif

Here's one of his projectiles that has the same palette as the parent.

Code:
name    xr01
type    none
subject_to_hole 0
subject_to_obstacle 0
subject_to_platform 1
subject_to_gravity 0
subject_to_wall 1
no_adjust_base 1


animationscript   data/scripts/lib001.c
onspawnscript     data/scripts/projpal.c

palette        data/chars/misc/ess/alter01.gif 
alternatepal   data/chars/misc/ess/alter02.gif 
alternatepal   data/chars/misc/ess/alter03.gif 
alternatepal   data/chars/misc/ess/alter04.gif 
alternatepal   data/chars/misc/ess/alter05.gif 
alternatepal   data/chars/misc/ess/alter06.gif 
alternatepal   data/chars/misc/ess/alter07.gif 
alternatepal   data/chars/misc/ess/alter08.gif 
alternatepal   data/chars/misc/ess/alter09.gif 
alternatepal   data/chars/misc/ess/alter10.gif 


anim idle
@script
    void self = getlocalvar("self");

    if(frame==1){
      changeentityproperty(self, "subject_to_gravity", 1);
      changeentityproperty(self, "subject_to_wall", 0);
    }
    if(frame==7){
      changeentityproperty(self, "subject_to_gravity", 0);
    }
    if(frame==46){
      changeentityproperty(self, "subject_to_gravity", 1);
    }
@end_script
     loop       0
     delay      7
     offset     80 129
     bbox       0
     jumpframe  2 3 -0.3 0
     dropframe  7
         frame      data/chars/misc/ess/xr01.gif
         frame      data/chars/misc/ess/xr02.gif
     delay      6
         frame      data/chars/misc/ess/xr03.gif
         frame      data/chars/misc/ess/xr04.gif
         frame      data/chars/misc/ess/xr05.gif
         frame      data/chars/misc/ess/xr06.gif
     delay      999
         frame      data/chars/misc/ess/xr07.gif
     delay      7
@cmd jump001 0.1 0 0
@cmd velo001 0 0 0
         sound      data/chars/misc/ess/mchgun.wav
         frame      data/chars/misc/ess/xr08.gif
         frame      data/chars/misc/ess/xr09.gif
         sound      data/chars/misc/ess/essw4.wav
         frame      data/chars/misc/ess/xr08.gif          #10
         frame      data/chars/misc/ess/xr09.gif
         sound      data/chars/misc/ess/mchgun.wav
         frame      data/chars/misc/ess/xr08.gif
         frame      data/chars/misc/ess/xr09.gif
         sound      data/chars/misc/ess/mchgun.wav
         frame      data/chars/misc/ess/xr08.gif
         frame      data/chars/misc/ess/xr09.gif
         frame      data/chars/misc/ess/xr08.gif
         frame      data/chars/misc/ess/xr09.gif
         frame      data/chars/misc/ess/xr08.gif
         frame      data/chars/misc/ess/xr09.gif
         frame      data/chars/misc/ess/xr08.gif   #20
         frame      data/chars/misc/ess/xr09.gif
         frame      data/chars/misc/ess/xr08.gif
         frame      data/chars/misc/ess/xr09.gif
         frame      data/chars/misc/ess/xr08.gif
         frame      data/chars/misc/ess/xr09.gif
     delay      7
         frame      data/chars/misc/ess/xr10.gif
         frame      data/chars/misc/ess/xr11.gif
         frame      data/chars/misc/ess/xr12.gif
     delay      15
         frame      data/chars/misc/ess/xr13.gif
     delay      7
         frame      data/chars/misc/ess/xr14.gif    #30
         frame      data/chars/misc/ess/xr15.gif
         frame      data/chars/misc/ess/xr16.gif
     delay      40
         frame      data/chars/misc/ess/xr17.gif
     delay      6
         frame      data/chars/misc/ess/xr18.gif
     delay      30
         frame      data/chars/misc/ess/xr19.gif
     delay      6
         frame      data/chars/misc/ess/xr20.gif
         frame      data/chars/misc/ess/xr21.gif
         frame      data/chars/misc/ess/xr22.gif
         frame      data/chars/misc/ess/xr23.gif
     delay      55
         frame      data/chars/misc/ess/xr24.gif    #40
     delay      6
         frame      data/chars/misc/ess/xr25.gif
         frame      data/chars/misc/ess/xr26.gif
         frame      data/chars/misc/ess/xr27.gif
         frame      data/chars/misc/ess/xr28.gif
         frame      data/chars/misc/ess/xr29.gif
         frame      data/chars/misc/ess/xr30.gif
     delay      8
@cmd jump001 0.8 1.1 0 0
         frame      data/chars/misc/ess/xr31.gif
         frame      data/chars/misc/ess/xr32.gif




    @cmd killentity getlocalvar("self")
     frame     data/chars/0misc/empty.gif

For the projectile spawning, declare it as onspawnscript (if you look above).

projpal.c:
C:
void main(){
    changePalette();
}

void changePalette(){
    void self = getlocalvar("self");
    void parent = getentityproperty(self, "parent");
    int Pmap = getentityproperty(parent, "map");

    if(Pmap){
        changeentityproperty(self, "map", Pmap);
    }
}

Does that arm entity from Mary have equally the same color table as her?

I did help Mr. Q with this, so I had to do one Street Fighter character for spawning projectiles that have the same palette and same color table as the parent first.
Characters and projectiles use the same palette.
 
I applied the script you just posted.

C:
name         06MOB-C
type             none
nomove        1
shadow        0

script         data/scripts/06m.c
onspawnscript     data/scripts/projpal.c

palette        data/sprites/sprite/chara/06m/Idle-01.gif

alternatepal     data/sprites/sprite/chara/06m/Alt-01.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-02.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-03.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-04.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-05.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-06.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-07.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-08.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-09.gif
alternatepal     data/sprites/sprite/chara/06m/Alt-10.gif

anim    idle
    frame       none
    offset    20 90
    frame    data/sprites/sprite/chara/06m/maryob-c01.gif
    frame    data/sprites/sprite/chara/06m/maryob-c01.gif
    offset    2 88
    frame    data/sprites/sprite/chara/06m/maryob-c02.gif
    offset    -5 88
    frame    data/sprites/sprite/chara/06m/maryob-c03.gif
    frame       none
 
OK. Did you take a look at the name called onspawnscript for the arm part in its header?

C:
void main(){
    changePalette();
}

void changePalette(){
    void self = getlocalvar("self");
    void parent = getentityproperty(self, "parent");
    int Pmap = getentityproperty(parent, "map");

    if(Pmap){
        changeentityproperty(self, "map", Pmap);
    }
}
KoR - 0084.png

The script seems to have been applied well and the character's color has been changed, but only the default color appears.
 
Weird. It works on mine, but not on yours. I mean they also apply to the same color table in order like this here.

6-30-2024 10-03-26 AM.png

6-30-2024 10-04-03 AM.png


It's working on mine even though I use this with onspawnscript here.
This also works on mine (but maybe not to some others.)
C:
void main(){
    changePalette();
}

void changePalette(){
    void self = getlocalvar("self");
    void parent = getentityproperty(self, "parent");
    int Pmap = getentityproperty(parent, "map");

    changeentityproperty(self, "map", Pmap);
}

Code:
name Gouken
type player
health 100
speed 10
atchain 1
shadow 0
load gohadoken
com d f a freespecial
com d f a2 freespecial2
com d f a3 freespecial3

palette        data/chars/gouken/Palettes/Default.png
alternatepal    data/chars/gouken/Palettes/Jotaro_Joestar_Kastro.png
alternatepal    data/chars/gouken/Palettes/NDSilva_Raikage.png
alternatepal    data/chars/gouken/Palettes/Meldo_Original2.png
alternatepal    data/chars/gouken/Palettes/Blagoy_OldSF3.png
alternatepal    data/chars/gouken/Palettes/ExL_SolomonMuto.png

Code:
name GoHadoken
type trap
speed 10
alpha 1
health 1
hostile enemy player trap none npc
gfxshadow 0
nolife 1
remove 1
offscreenkill 69
setlayer 300
subject_to_gravity 0
candamage npc none enemy player trap

palette        data/chars/gouken/Palettes/Default.png
alternatepal    data/chars/gouken/Palettes/Jotaro_Joestar_Kastro.png
alternatepal    data/chars/gouken/Palettes/NDSilva_Raikage.png
alternatepal    data/chars/gouken/Palettes/Meldo_Original2.png
alternatepal    data/chars/gouken/Palettes/Blagoy_OldSF3.png
alternatepal    data/chars/gouken/Palettes/ExL_SolomonMuto.png

My Mod - 0891.pngMy Mod - 0892.png
6-30-2024 10-17-13 AM.png
Default.png
Jotaro_Joestar_Kastro.png

6-30-2024 10-22-29 AM.png

If it's not working, you can take a look at this.

Or you can look at @O Ilusionista's use of Vision which he used spawn01map.

Code:
name   Vision
health      240
mp 70
speed   13
type      player

palette data/chars/vision/palnew1.gif
alternatepal data/chars/vision/original.gif
alternatepal data/chars/vision/white.gif
alternatepal data/chars/vision/VISION_SMARTPAL_V5_PAL_EURTH.gif
alternatepal data/chars/vision/BEASTIE_MAP2.gif
alternatepal data/chars/vision/palwc.gif
alternatepal data/chars/vision/freeze.gif
alternatepal data/chars/vision/venon.gif
fmap 6
hmap 7 7

animationscript data/scripts/grabscript.c
onkillscript data/scripts/dead.c
takedamagescript data/scripts/antivenon.c
onmoveascript data/scripts/antihole.c



load vfree

Code:
anim    freespecial2
    loop    0
    delay    7
    offset    243 270
    fastattack    1
    Energycost    10 1 0
    hitflash    flash3
    hitfx    data/sounds/robohit1.wav
    jumpframe    12 2 1 0
    frame    data/chars/vision/att401.gif
    bbox    0 0 0 0
    attack    0 0 0 0 0 0 0 0 0 0
    @cmd    spawn01 "sdust" 0 0 0
    frame    data/chars/vision/fall200.gif
    bbox    0 0 0 0
    @cmd    spawn01map "vfree" 0 0 0
    delay    40
    move    10
    sound    data/chars/vision/sound/phase1.wav
    frame    data/chars/vision/blast/empty.gif
    delay    4
    move    0
    frame    data/chars/vision/free00.gif
    frame    data/chars/vision/free01.gif
    frame    data/chars/vision/free02.gif
    frame    data/chars/vision/free03.gif
    attack    221 214 47 57 10 1 0 0 0 0
    delay    4
    @cmd    velo001 1 0 3
    frame    data/chars/vision/free04.gif
    attack    0 0 0 0 0 0 0 0 0 0
    frame    data/chars/vision/free05.gif
    attack    221 210 47 59 10 2 0 0 0 0
    frame    data/chars/vision/free06.gif
    attack    0 0 0 0 0 0 0 0 0 0
    frame    data/chars/vision/free05.gif
    attack    221 210 47 59 10 2 0 0 0 0
    frame    data/chars/vision/free06.gif
    attack    0 0 0 0 0 0 0 0 0 0
    frame    data/chars/vision/free05.gif
    attack    221 210 47 59 10 2 0 0 0 0
    frame    data/chars/vision/free06.gif
    offset    245 270
    bbox    217 217 50 46
    attack    0 0 0 0 0 0 0 0 0 0
    frame    data/chars/vision/jump00.gif
    bbox    226 215 34 53
    frame    data/chars/vision/jump01.gif

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

    void self = getlocalvar("self"); //Get calling entity.
    int  iMap = getentityproperty(self, "map"); // Get caller's remap.
    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.
    changeentityproperty(vSpawn, "map", iMap); //Set map.
    
    return vSpawn; //Return spawn.
}

Code:
name    vfree
type    none
lifespan 0.2
no_adjust_base 1
antigravity 100

palette data/chars/vision/palnew1.gif
alternatepal data/chars/vision/original.gif
alternatepal data/chars/vision/white.gif
alternatepal data/chars/vision/VISION_SMARTPAL_V5_PAL_EURTH.gif
alternatepal data/chars/vision/BEASTIE_MAP2.gif
alternatepal data/chars/vision/palwc.gif
alternatepal data/chars/vision/freeze.gif
fmap 6

anim    idle
    loop    0
    delay    2
    offset    245 270
    movea    -20
    move    6
    sound    data/chars/vision/sound/phase2.wav
    frame    data/chars/vision/dash00.gif
    frame    data/chars/vision/blast/empty.gif
    offset    242 274
    frame    data/chars/vision/dash01.gif
    frame    data/chars/vision/blast/empty.gif
    offset    240 276
    frame    data/chars/vision/dash02.gif
    frame    data/chars/vision/blast/empty.gif
    offset    238 279
    frame    data/chars/vision/dash00.gif
    frame    data/chars/vision/blast/empty.gif
    offset    232 288
    frame    data/chars/vision/dash01.gif
    frame    data/chars/vision/blast/empty.gif
    offset    227 299
    frame    data/chars/vision/dash02.gif
    delay    100
    frame    data/chars/vision/blast/empty.gif
 
Weird. It works on mine, but not on yours. I mean they also apply to the same color table in order like this here.

View attachment 8460

View attachment 8461


It's working on mine even though I use this with onspawnscript here.
This also works on mine (but maybe not to some others.)
C:
void main(){
    changePalette();
}

void changePalette(){
    void self = getlocalvar("self");
    void parent = getentityproperty(self, "parent");
    int Pmap = getentityproperty(parent, "map");

    changeentityproperty(self, "map", Pmap);
}

Code:
name Gouken
type player
health 100
speed 10
atchain 1
shadow 0
load gohadoken
com d f a freespecial
com d f a2 freespecial2
com d f a3 freespecial3

palette        data/chars/gouken/Palettes/Default.png
alternatepal    data/chars/gouken/Palettes/Jotaro_Joestar_Kastro.png
alternatepal    data/chars/gouken/Palettes/NDSilva_Raikage.png
alternatepal    data/chars/gouken/Palettes/Meldo_Original2.png
alternatepal    data/chars/gouken/Palettes/Blagoy_OldSF3.png
alternatepal    data/chars/gouken/Palettes/ExL_SolomonMuto.png

Code:
name GoHadoken
type trap
speed 10
alpha 1
health 1
hostile enemy player trap none npc
gfxshadow 0
nolife 1
remove 1
offscreenkill 69
setlayer 300
subject_to_gravity 0
candamage npc none enemy player trap

palette        data/chars/gouken/Palettes/Default.png
alternatepal    data/chars/gouken/Palettes/Jotaro_Joestar_Kastro.png
alternatepal    data/chars/gouken/Palettes/NDSilva_Raikage.png
alternatepal    data/chars/gouken/Palettes/Meldo_Original2.png
alternatepal    data/chars/gouken/Palettes/Blagoy_OldSF3.png
alternatepal    data/chars/gouken/Palettes/ExL_SolomonMuto.png

View attachment 8462View attachment 8463
View attachment 8464
View attachment 8465
View attachment 8466

View attachment 8467

If it's not working, you can take a look at this.

Or you can look at @O Ilusionista's use of Vision which he used spawn01map.

Code:
name   Vision
health      240
mp 70
speed   13
type      player

palette data/chars/vision/palnew1.gif
alternatepal data/chars/vision/original.gif
alternatepal data/chars/vision/white.gif
alternatepal data/chars/vision/VISION_SMARTPAL_V5_PAL_EURTH.gif
alternatepal data/chars/vision/BEASTIE_MAP2.gif
alternatepal data/chars/vision/palwc.gif
alternatepal data/chars/vision/freeze.gif
alternatepal data/chars/vision/venon.gif
fmap 6
hmap 7 7

animationscript data/scripts/grabscript.c
onkillscript data/scripts/dead.c
takedamagescript data/scripts/antivenon.c
onmoveascript data/scripts/antihole.c



load vfree

Code:
anim    freespecial2
    loop    0
    delay    7
    offset    243 270
    fastattack    1
    Energycost    10 1 0
    hitflash    flash3
    hitfx    data/sounds/robohit1.wav
    jumpframe    12 2 1 0
    frame    data/chars/vision/att401.gif
    bbox    0 0 0 0
    attack    0 0 0 0 0 0 0 0 0 0
    @cmd    spawn01 "sdust" 0 0 0
    frame    data/chars/vision/fall200.gif
    bbox    0 0 0 0
    @cmd    spawn01map "vfree" 0 0 0
    delay    40
    move    10
    sound    data/chars/vision/sound/phase1.wav
    frame    data/chars/vision/blast/empty.gif
    delay    4
    move    0
    frame    data/chars/vision/free00.gif
    frame    data/chars/vision/free01.gif
    frame    data/chars/vision/free02.gif
    frame    data/chars/vision/free03.gif
    attack    221 214 47 57 10 1 0 0 0 0
    delay    4
    @cmd    velo001 1 0 3
    frame    data/chars/vision/free04.gif
    attack    0 0 0 0 0 0 0 0 0 0
    frame    data/chars/vision/free05.gif
    attack    221 210 47 59 10 2 0 0 0 0
    frame    data/chars/vision/free06.gif
    attack    0 0 0 0 0 0 0 0 0 0
    frame    data/chars/vision/free05.gif
    attack    221 210 47 59 10 2 0 0 0 0
    frame    data/chars/vision/free06.gif
    attack    0 0 0 0 0 0 0 0 0 0
    frame    data/chars/vision/free05.gif
    attack    221 210 47 59 10 2 0 0 0 0
    frame    data/chars/vision/free06.gif
    offset    245 270
    bbox    217 217 50 46
    attack    0 0 0 0 0 0 0 0 0 0
    frame    data/chars/vision/jump00.gif
    bbox    226 215 34 53
    frame    data/chars/vision/jump01.gif

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

    void self = getlocalvar("self"); //Get calling entity.
    int  iMap = getentityproperty(self, "map"); // Get caller's remap.
    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.
    changeentityproperty(vSpawn, "map", iMap); //Set map.
   
    return vSpawn; //Return spawn.
}

Code:
name    vfree
type    none
lifespan 0.2
no_adjust_base 1
antigravity 100

palette data/chars/vision/palnew1.gif
alternatepal data/chars/vision/original.gif
alternatepal data/chars/vision/white.gif
alternatepal data/chars/vision/VISION_SMARTPAL_V5_PAL_EURTH.gif
alternatepal data/chars/vision/BEASTIE_MAP2.gif
alternatepal data/chars/vision/palwc.gif
alternatepal data/chars/vision/freeze.gif
fmap 6

anim    idle
    loop    0
    delay    2
    offset    245 270
    movea    -20
    move    6
    sound    data/chars/vision/sound/phase2.wav
    frame    data/chars/vision/dash00.gif
    frame    data/chars/vision/blast/empty.gif
    offset    242 274
    frame    data/chars/vision/dash01.gif
    frame    data/chars/vision/blast/empty.gif
    offset    240 276
    frame    data/chars/vision/dash02.gif
    frame    data/chars/vision/blast/empty.gif
    offset    238 279
    frame    data/chars/vision/dash00.gif
    frame    data/chars/vision/blast/empty.gif
    offset    232 288
    frame    data/chars/vision/dash01.gif
    frame    data/chars/vision/blast/empty.gif
    offset    227 299
    frame    data/chars/vision/dash02.gif
    delay    100
    frame    data/chars/vision/blast/empty.gif
KoR - 0088.png

C:
   void self = getlocalvar("self");
   int  iMap = getentityproperty(self, "map");
   void Spawn;

   Spawn = spawn01(Name, dx, dy, 4);
   bindentity(Spawn, self, dx, dz, dy, iDir, 0);
   changeentityproperty(Spawn, "parent", self);
   changeentityproperty(Spawn, "map", iMap);

thank you I referred to the script you just uploaded and applied it to the bind script I use, and it finally worked.
 
Great work. Glad you did it.

I forgot that I used this special animation script on the map for my VS project, but you figured out.

Code:
anim freespecial #Gadouken L (straight)
    offset 97 159
    delay 7
    #spawnframe 5 100 0 50 0
    #custentity gohadoken
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000000.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000001.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000002.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000003.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000004.png
    @cmd spawnAndThrowMap "gohadoken" 80 0 76 1 0 0 #spawnAndThrowMap {projectilename} {x} {z} {y} {vx} {vz} {vy}
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000005.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000006.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000007.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000008.png

anim freespecial2 #Gadouken M (45-degree angle)
    offset 97 159
    delay 7
    #spawnframe 5 100 0 50 0
    #custentity gohadoken
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000000.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000001.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000002.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000003.png
    offset 41 106
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10100004.png
    @cmd spawnAndThrowMap2 "gohadoken" openborconstant("ANI_FOLLOW2") 70 0 105 1 0 1 #spawnAndThrowMap2 {projectilename} {animation} {x} {z} {y} {vx} {vz} {vy}
    #@cmd spawnAndThrowMapWithDrawmethod "gohadoken" openborconstant("ani_follow2") 128 128 1 315 45 90 0 105 0.5 0 0.5# spawnAndThrowMapWithDrawmethod {projectilename} {animation} {scaleX} {scaleY} {alpha} {rotate} {rotate2} {x} {z} {y} {Vx} {Vz} {Vy}
    #frame data/CHARS/Gouken/SPEC1/gouken.pcx10100004.png
    offset 41 114
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10100005.png
    offset 40 112
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10100006.png
    offset 97 159
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000007.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000008.png

anim freespecial3 #Gadouken H (75-degree angle)
    offset 97 159
    delay 7
    #spawnframe 5 100 0 50 0
    #custentity gohadoken
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000000.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000001.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000002.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000003.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000004.png
    offset 38 120
    @cmd spawnAndThrowMap2 "gohadoken" openborconstant("ANI_FOLLOW3") 64 0 116 1 0 1 #spawnAndThrowMap2 {projectilename} {animation} {x} {z} {y} {vx} {vz} {vy}
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10200005.png
    offset 37 118
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10200006.png
    offset 97 159
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000007.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000008.png

You really don't have to copy these scripts since they are unique for my SF game project in unleashing projectiles (with maps). But you only take a look at the changing palette/map part specifically throwProjM.
C:
void spawnAndThrowMap(void projName, float xPos, float zPos, float yPos, float fX, float fZ, float fY){

// Edited by Max Man (maxman)
// Date edited: 05-11-2023
// Original script by: Piccolo
// Changing maps of projectile based on parent entity's palette
    
    void proj = spawn01(projName, xPos, yPos, zPos);
    throwProjM(proj, fX, fZ, fY);
}

void spawnAndThrowMap2(void projName, void Anim, float xPos, float zPos, float yPos, float fX, float fZ, float fY){

// Edited by Max Man (maxman)
// Date edited: 05-11-2023
// Original script by: Piccolo
    
    void proj = spawn01(projName, xPos, yPos, zPos);
    performattack(proj, Anim);
    throwProjM(proj, fX, fZ, fY);
}

void throwProjM(void proj, float fX, float fZ, float fY){

    void self = getlocalvar("self");
    void target = getentityproperty(self, "opponent");
    void parent = getentityproperty(self, "parent");
    void index = getentityproperty(self, "playerindex");
    int map = getentityproperty(self, "map");

    if(fX == -77) fX = getlocalvar("x"+self);
    else if(fX == -33) fX = getlocalvar("x"+self) / 2;
    else if (getentityproperty(proj, "direction")==0){
        fX = -fX;
            
    }
    
    if(fZ == -77) fZ = getlocalvar("z"+self);
    else if(fZ == -33) fZ = getlocalvar("z"+self) / 2;
    
    
    changeentityproperty(proj, "velocity", fX, fZ, fY);
    changeentityproperty(proj, "map", map);

}

It's my fault for not showing an example of the map in script before. But I tried using custentity with that before using the script, and it is/was working well, like it works with one of Spawn's parts in UDD.
 
Great work. Glad you did it.

I forgot that I used this special animation script on the map for my VS project, but you figured out.

Code:
anim freespecial #Gadouken L (straight)
    offset 97 159
    delay 7
    #spawnframe 5 100 0 50 0
    #custentity gohadoken
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000000.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000001.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000002.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000003.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000004.png
    @cmd spawnAndThrowMap "gohadoken" 80 0 76 1 0 0 #spawnAndThrowMap {projectilename} {x} {z} {y} {vx} {vz} {vy}
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000005.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000006.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000007.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000008.png

anim freespecial2 #Gadouken M (45-degree angle)
    offset 97 159
    delay 7
    #spawnframe 5 100 0 50 0
    #custentity gohadoken
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000000.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000001.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000002.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000003.png
    offset 41 106
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10100004.png
    @cmd spawnAndThrowMap2 "gohadoken" openborconstant("ANI_FOLLOW2") 70 0 105 1 0 1 #spawnAndThrowMap2 {projectilename} {animation} {x} {z} {y} {vx} {vz} {vy}
    #@cmd spawnAndThrowMapWithDrawmethod "gohadoken" openborconstant("ani_follow2") 128 128 1 315 45 90 0 105 0.5 0 0.5# spawnAndThrowMapWithDrawmethod {projectilename} {animation} {scaleX} {scaleY} {alpha} {rotate} {rotate2} {x} {z} {y} {Vx} {Vz} {Vy}
    #frame data/CHARS/Gouken/SPEC1/gouken.pcx10100004.png
    offset 41 114
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10100005.png
    offset 40 112
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10100006.png
    offset 97 159
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000007.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000008.png

anim freespecial3 #Gadouken H (75-degree angle)
    offset 97 159
    delay 7
    #spawnframe 5 100 0 50 0
    #custentity gohadoken
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000000.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000001.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000002.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000003.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000004.png
    offset 38 120
    @cmd spawnAndThrowMap2 "gohadoken" openborconstant("ANI_FOLLOW3") 64 0 116 1 0 1 #spawnAndThrowMap2 {projectilename} {animation} {x} {z} {y} {vx} {vz} {vy}
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10200005.png
    offset 37 118
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10200006.png
    offset 97 159
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000007.png
    frame data/CHARS/Gouken/SPEC1/gouken.pcx10000008.png

You really don't have to copy these scripts since they are unique for my SF game project in unleashing projectiles (with maps). But you only take a look at the changing palette/map part specifically throwProjM.
C:
void spawnAndThrowMap(void projName, float xPos, float zPos, float yPos, float fX, float fZ, float fY){

// Edited by Max Man (maxman)
// Date edited: 05-11-2023
// Original script by: Piccolo
// Changing maps of projectile based on parent entity's palette
   
    void proj = spawn01(projName, xPos, yPos, zPos);
    throwProjM(proj, fX, fZ, fY);
}

void spawnAndThrowMap2(void projName, void Anim, float xPos, float zPos, float yPos, float fX, float fZ, float fY){

// Edited by Max Man (maxman)
// Date edited: 05-11-2023
// Original script by: Piccolo
   
    void proj = spawn01(projName, xPos, yPos, zPos);
    performattack(proj, Anim);
    throwProjM(proj, fX, fZ, fY);
}

void throwProjM(void proj, float fX, float fZ, float fY){

    void self = getlocalvar("self");
    void target = getentityproperty(self, "opponent");
    void parent = getentityproperty(self, "parent");
    void index = getentityproperty(self, "playerindex");
    int map = getentityproperty(self, "map");

    if(fX == -77) fX = getlocalvar("x"+self);
    else if(fX == -33) fX = getlocalvar("x"+self) / 2;
    else if (getentityproperty(proj, "direction")==0){
        fX = -fX;
           
    }
   
    if(fZ == -77) fZ = getlocalvar("z"+self);
    else if(fZ == -33) fZ = getlocalvar("z"+self) / 2;
   
   
    changeentityproperty(proj, "velocity", fX, fZ, fY);
    changeentityproperty(proj, "map", map);

}

It's my fault for not showing an example of the map in script before. But I tried using custentity with that before using the script, and it is/was working well, like it works with one of Spawn's parts in UDD.
I'm proud that I can do something like this even though I don't know how to write a script.
 
  • Like
Reactions: NED
Back
Top Bottom