Apr 3, 2014 at 11:26 PM
Tommy Thunder
Discord Group Admin
Org Discord Moderator
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 24, 2011
Location: New Westminster, BC
Posts: 1368
Age: 28
I'm having a little trouble with flags.

I have a flag set whenever the player defeats a level. This flag is NEVER un-set manually (I'm sure of this because I've tried testing this with an unused flag), but it seems to be un-setting itself whenever the player dies. The game definitely saves the flag, because the flag still appears to be set after I exit and enter the game again before dying. I do have a script, but I'm a unwilling to post it because it's a little messy and this sounds like something that could be solved without it. Any reason why the flag would be un-set without using <FL-XXXX?
 
Apr 3, 2014 at 11:39 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
I'm having a little trouble with flags.

I have a flag set whenever the player defeats a level. This flag is NEVER un-set manually (I'm sure of this because I've tried testing this with an unused flag), but it seems to be un-setting itself whenever the player dies. The game definitely saves the flag, because the flag still appears to be set after I exit and enter the game again before dying. I do have a script, but I'm a unwilling to post it because it's a little messy and this sounds like something that could be solved without it. Any reason why the flag would be un-set without using <FL-XXXX?
Oh wow I never thought I would have to explain this but...

Flags are saved when you save the game. If you reload a save, then your flags are reset to whatever they were when you saved the game.
 
Apr 3, 2014 at 11:43 PM
Tommy Thunder
Discord Group Admin
Org Discord Moderator
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 24, 2011
Location: New Westminster, BC
Posts: 1368
Age: 28
GIRakaCHEEZER said:
Oh wow I never thought I would have to explain this but...

Flags are saved when you save the game. If you reload a save, then your flags are reset to whatever they were when you saved the game.
The flag is set just before the game saves. I explained that it STILL saves after I close the game, just not after I die. Did you read my post all the way through or am I misinterpreting something?
 
Apr 3, 2014 at 11:48 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
Tpcool said:
The flag is set just before the game saves. I explained that it STILL saves after I close the game, just not after I die. Did you read my post all the way through or am I misinterpreting something?
The game is not saved when you die. If it was, you would be dead when you reloaded the game.
 
Apr 3, 2014 at 11:52 PM
Tommy Thunder
Discord Group Admin
Org Discord Moderator
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 24, 2011
Location: New Westminster, BC
Posts: 1368
Age: 28
GIRakaCHEEZER said:
The game is not saved when you die. If it was, you would be dead when you reloaded the game.
The flag is set, the game is saved, then I die. Shouldn't the flag be set when I reload, since it saved with the flag set a moment ago? Even if what you're saying is correct, that doesn't explain why I can close the game down entirely and still have the flag set when I open it up again.
 
Apr 3, 2014 at 11:55 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
I think you might just need to post your script for this problem, because I don't think I can diagnose your issues without it.
 
Apr 4, 2014 at 12:09 AM
Tommy Thunder
Discord Group Admin
Org Discord Moderator
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 24, 2011
Location: New Westminster, BC
Posts: 1368
Age: 28
This is where the flag (1200) is set.
Code:
#0200
<KEY<SK-0030<SK+0031
<CMU0002<FON0300:0001<MYD0002<HMC
<ANP0501:0050:0002<WAI0007<ANP0501:0000:0002<CNP0501:0321:0002
<FAI0002<ANP0500:0050:0002<WAI0047<ANP0500:0000:0002
<SMP0001:0009<SMP0002:0009<SOU0045<WAI0006
<SMP0001:0010<SMP0002:0010<SOU0045<WAI0006
<SMP0001:0011<SMP0002:0011<SOU0045<WAI0006
<DNP0500<MOV0003:0011<SMC<END
#0201
<KEY<MYD0002<CMU0002<FON0300:0001
<ANP0501:0050:0002<WAI0007<ANP0501:0000:0002<CNP0501:0321:0002
<SMP0001:0009<SMP0002:0009
<SMP0001:0010<SMP0002:0010
<SMP0001:0011<SMP0002:0011
<FAI0004<END

#0400
<FL+1000<KEY<DNP0400<MYD0002<MM0<WAS
<SMP0020:0011<SMP0021:0011<SOU0045<WAI0006
<SMP0020:0010<SMP0021:0010<SOU0045<WAI0006
<SMP0020:0009<SMP0021:0009<SOU0045<WAI0006
<HMC<CNP0501:0150:0002<FON0301:0020<WAI0010
<ANP0501:0050:0002<FMU<WAI0091<ANP0501:0000:0002
<SMP0020:0009<SMP0021:0009<SOU0045<WAI0006
<SMP0020:0010<SMP0021:0010<SOU0045<WAI0006
<SMP0020:0011<SMP0021:0011<SOU0045<WAI0006
<WAI0015<MOV0024:0011<SMC<DNP0501<FLJ1200:0601
<WAI0010<CMU0007<MNP0502:0038:0002:0000
<WAI0150<BSL0502<ANP0502:0001:0004<END
#0502
<FL-1000<DNA0189<DNA0325<DNA0146<DNA0277<CMU0000<SK-0031
<SNP0004:0024:0005:0000<SNP0004:0039:0004:0000
<SNP0004:0027:0008:0000<SNP0004:0035:0008:0000<SNP0004:0031:0008:0000
<SNP0004:0024:0009:0000<SNP0004:0039:0009:0000
<CNP0502:0004:0000<SOU0044<WAI0025
<SNP0004:0024:0005:0000<SNP0004:0039:0004:0000
<SNP0004:0027:0008:0000<SNP0004:0035:0008:0000<SNP0004:0031:0008:0000
<SNP0004:0024:0009:0000<SNP0004:0039:0009:0000<SOU0044<WAI0025
<SNP0004:0024:0005:0000<SNP0004:0039:0004:0000
<SNP0004:0027:0008:0000<SNP0004:0035:0008:0000<SNP0004:0031:0008:0000
<SNP0004:0024:0009:0000<SNP0004:0039:0009:0000
<SOU0044<WAI0100<MM0<KEY<CMU0008
<FL+1200<FL+1201<FL+1202
<WAI0225<FAO0004
<TAM0002:0006:0000<TAM0003:0008:0000<TAM0004:0011:0000
<TRA0050:0200:0005:0005
#0600
<SK-0031<HMC<PRI<FMU<FAO0004<AM-0002
<SK-0000<SK-0001<SK-0002<SK-0010<SK-0011<SK-0012
<IT-0004<IT-0003<IT+0001<TRA0001:0204:0001:0001
#0601
<SK-0031<PRI<FMU<FAO0004<AM-0002
<SK-0000<SK-0001<SK-0002<SK-0010<SK-0011<SK-0012
<IT-0004<IT-0003<IT+0001<TRA0001:0204:0001:0001

The previous room transitions to here, but I doubt this is the problem because you can't die or do anything significant here:
Code:
#0200
<KEY<HMC<FON0300:0001<FAI0004<CMU0009<WAI0010
<SMC<MYD0002<MOV0010:0000<WAI0110<HMC<SOU0044
<SNP0004:0000:0002:0000<SNP0004:0002:0002:0000<SNP0004:0004:0002:0000
<SNP0004:0006:0002:0000<SNP0004:0008:0002:0000<SNP0004:0010:0002:0000
<SNP0004:0012:0002:0000<SNP0004:0014:0002:0000<SNP0004:0016:0002:0000
<SNP0004:0018:0002:0000<SNP0004:0020:0002:0000<SNP0004:0022:0002:0000
<SNP0004:0001:0004:0000<SNP0004:0003:0004:0000<SNP0004:0005:0004:0000
<SNP0004:0007:0004:0000<SNP0004:0009:0004:0000<SNP0004:0011:0004:0000
<SNP0004:0013:0004:0000<SNP0004:0015:0004:0000<SNP0004:0017:0004:0000
<SNP0004:0019:0004:0000<SNP0004:0021:0004:0000<SNP0004:0023:0004:0000
<SNP0004:0000:0006:0000<SNP0004:0002:0006:0000<SNP0004:0004:0006:0000
<SNP0004:0006:0006:0000<SNP0004:0008:0006:0000<SNP0004:0010:0006:0000
<SNP0004:0012:0006:0000<SNP0004:0014:0006:0000<SNP0004:0016:0006:0000
<SNP0004:0018:0006:0000<SNP0004:0020:0006:0000<SNP0004:0022:0006:0000
<SNP0004:0001:0008:0000<SNP0004:0003:0008:0000<SNP0004:0005:0008:0000
<SNP0004:0007:0008:0000<SNP0004:0009:0008:0000<SNP0004:0011:0008:0000
<SNP0004:0013:0008:0000<SNP0004:0015:0008:0000<SNP0004:0017:0008:0000
<SNP0004:0019:0008:0000<SNP0004:0021:0008:0000<SNP0004:0023:0008:0000
<SNP0004:0000:0010:0000<SNP0004:0002:0010:0000<SNP0004:0004:0010:0000
<SNP0004:0006:0010:0000<SNP0004:0008:0010:0000<SNP0004:0010:0010:0000
<SNP0004:0012:0010:0000<SNP0004:0014:0010:0000<SNP0004:0016:0010:0000
<SNP0004:0018:0010:0000<SNP0004:0020:0010:0000<SNP0004:0022:0010:0000
<SNP0004:0001:0012:0000<SNP0004:0003:0012:0000<SNP0004:0005:0012:0000
<SNP0004:0007:0012:0000<SNP0004:0009:0012:0000<SNP0004:0011:0012:0000
<SNP0004:0013:0012:0000<SNP0004:0015:0012:0000<SNP0004:0017:0012:0000
<SNP0004:0019:0012:0000<SNP0004:0021:0012:0000<SNP0004:0023:0012:0000
<SNP0004:0000:0014:0000<SNP0004:0002:0014:0000<SNP0004:0004:0014:0000
<SNP0004:0006:0014:0000<SNP0004:0008:0014:0000<SNP0004:0010:0014:0000
<SNP0004:0012:0014:0000<SNP0004:0014:0014:0000<SNP0004:0016:0014:0000
<SNP0004:0018:0014:0000<SNP0004:0020:0014:0000<SNP0004:0022:0014:0000
<SNP0004:0001:0016:0000<SNP0004:0003:0016:0000<SNP0004:0005:0016:0000
<SNP0004:0007:0016:0000<SNP0004:0009:0016:0000<SNP0004:0011:0016:0000
<SNP0004:0013:0016:0000<SNP0004:0015:0016:0000<SNP0004:0017:0016:0000
<SNP0004:0019:0016:0000<SNP0004:0021:0016:0000<SNP0004:0023:0016:0000
<SNP0004:0000:0018:0000<SNP0004:0002:0018:0000<SNP0004:0004:0018:0000
<SNP0004:0006:0018:0000<SNP0004:0008:0018:0000<SNP0004:0010:0018:0000
<SNP0004:0012:0018:0000<SNP0004:0014:0018:0000<SNP0004:0016:0018:0000
<SNP0004:0018:0018:0000<SNP0004:0020:0018:0000<SNP0004:0022:0018:0000
<FLJ1201:1201<FLJ1301:1301


#1201
<CMP0003:0012:0002<CMP0005:0012:0036<CMP0007:0012:0036<CMP0009:0012:0030
<CMP0011:0012:0046
<CMP0005:0014:0038<CMP0007:0014:0016<CMP0009:0014:0030<CMP0011:0014:0040
<CMP0013:0014:0057

<WAI0050<MNP0500:0000:0009:0002<ANP0500:0050:0002<WAI0125<ANP0500:0000:0002
<SMP0005:0004<SOU0031<WAI0010<SMP0007:0004<SOU0031<WAI0010
<SMP0009:0004<SOU0031<WAI0010<SMP0007:0006<SOU0031<WAI0010
<SMP0009:0006<SOU0031<WAI0010<SMP0011:0006<SOU0031<WAI0010
<SMP0013:0006<SOU0031<WAI0010<SMP0015:0006<SOU0031<WAI0010
<SMP0017:0006<SOU0031<WAI0010
<WAI0035
<SMP0003:0012<SOU0031<WAI0010<SMP0005:0012<SOU0031<WAI0010
<SMP0007:0012<SOU0031<WAI0010<SMP0009:0012<SOU0031<WAI0010
<SMP0011:0012<SOU0031<WAI0010<SMP0005:0014<SOU0031<WAI0010
<SMP0007:0014<SOU0031<WAI0010<SMP0009:0014<SOU0031<WAI0010
<SMP0011:0014<SOU0031<WAI0010<SMP0013:0014<SOU0031<WAI0099
<ANP0500:0050:0002<WAI0250<FAO0004<FMU<WAI0010
<AM+0004:0224<FL-1201<TRA0001:0210:0001:0001

#1301
<CMP0003:0012:0038<CMP0005:0012:0016<CMP0007:0012:0030<CMP0009:0012:0006
<CMP0011:0012:0022
<CMP0005:0014:0038<CMP0007:0014:0032<CMP0009:0014:0016<CMP0011:0014:0010
<CMP0013:0014:0036<CMP0015:0014:0010

<WAI0050<MNP0500:0000:0009:0002<ANP0500:0050:0002<WAI0125<ANP0500:0000:0002
<SMP0005:0004<SOU0031<WAI0010<SMP0007:0004<SOU0031<WAI0010
<SMP0009:0004<SOU0031<WAI0010<SMP0007:0006<SOU0031<WAI0010
<SMP0009:0006<SOU0031<WAI0010<SMP0011:0006<SOU0031<WAI0010
<SMP0013:0006<SOU0031<WAI0010<SMP0015:0006<SOU0031<WAI0010
<SMP0017:0006<SOU0031<WAI0010
<WAI0035
<SMP0003:0012<SOU0031<WAI0010<SMP0005:0012<SOU0031<WAI0010
<SMP0007:0012<SOU0031<WAI0010<SMP0009:0012<SOU0031<WAI0010
<SMP0011:0012<SOU0031<WAI0010<SMP0005:0014<SOU0031<WAI0010
<SMP0007:0014<SOU0031<WAI0010<SMP0009:0014<SOU0031<WAI0010
<SMP0011:0014<SOU0031<WAI0010<SMP0013:0014<SOU0031<WAI0010
<SMP0015:0014<SOU0031<WAI0010<SMP0017:0014<SOU0031<WAI0099
<ANP0500:0050:0002<WAI0250<FAO0004<FMU<WAI0010
<AM+0003:0084<FL-1301<TRA0001:0220:0001:0001

Finally, the hub area where the flags are handled and where the game saves:
Code:
#0200
<KEY<HMC<CMU0004<MOV0010:0016<SKJ0020:0206<FAI0003
<SKJ0010:0203<SKJ0000:0202
<IT+0001<EVE0207<END
#0201
<AM+0002:0000<TAM0002:0006:0000<TAM0003:0008:0000<TAM0004:0011:0000
<IT+0036<MNA<WAI0025<EQ+0064<MYD0000<MOV0009:0000
<SMC<WAI0079<FL+1000<FL+1110<LI+9999<EQ-0064<ANP0000:0010:0000
<TAM0006:0002:0000<TAM0008:0003:0000<TAM0011:0004:0000
<MYD0002<AE+<END
#0202
<SKJ0010:0205
<SK-0000
<IT-0003<IT+0001
<EVE0207<END
#0203
<SKJ0000:0205
<IT-0003<IT+0001
<SK-0010
<EVE0207<END
#0204
<KEY<HMC<CMU0004<MOV0010:0016<DNP0500<FAI0003<EVE0201<END
#0205
<IT-0004<IT+0003
<SK-0000
<EVE0207<END
#0206
<DNP0500<SK-0020<EVE0200
#0207
<SKJ0021:0208<EVE0250
#0208
<IT+0015<EVE0250

#0210
<KEY<HMC<CMU0004<FL+1000
<FAI0003<MNA
<WAI0025<EQ+0064
<MYD0000<MOV0009:0000<SMC<WAI0079
<LI+9999<EQ-0064<ANP0000:0010:0000
<TAM0006:0002:0000<TAM0008:0003:0000<TAM0011:0004:0000
<MYD0002<AE+<FL+1200<SVP<END

#0220
<KEY<HMC<CMU0004<FL+1000
<FAI0003<MNA
<WAI0025<EQ+0064
<MYD0000<MOV0009:0000<SMC<WAI0079
<LI+9999<EQ-0064<ANP0000:0010:0000
<TAM0006:0002:0000<TAM0008:0003:0000<TAM0011:0004:0000
<MYD0002<AE+<FL+1300<SVP<END

#0250
<FLJ1200:0251<EVE0252
#0251
<AM+0004:0224<EVE0252
#0252
<FLJ1300:0253<EVE0201
#0253
<AM+0003:0084<EVE0201

#0400
<KEY<MS2ENTER 'UNDERGROUND' STAGE?<YNJ0000<CLR<CMU0005<WAI0055
<CNP0408:0111:0002<HMC<WAI0060<ANP0400:0001:0000<WAI0225<FAO0004
<SK-0000<SK-0001<SK-0002<SK-0010<SK-0011<SK-0012<IT-0004<IT-0003<IT+0001
<TAM0002:0006:0000<TAM0003:0008:0000<TAM0004:0011:0000
<SK+0020<FL-1000<AE+<TRA0002:0200:0001:0001
#0401
<KEY<MS2ENTER 'FACILITY' STAGE?<YNJ0000<CLR<CMU0005<WAI0055
<CNP0409:0111:0002<HMC<WAI0060<ANP0401:0001:0000<WAI0225<FAO0004
<SK-0000<SK-0001<SK-0002<SK-0010<SK-0011<SK-0012<IT-0004<IT-0003<IT+0001
<TAM0002:0006:0000<TAM0003:0008:0000<TAM0004:0011:0000
<SK+0020<FL-1000<AE+<TRA0009:0200:0005:0000
#0402
<KEY<MS2TELEPORTER ERROR! PLEASE CONTACT
YOUR LOCAL ADMINISTRATOR.<NOD<CLO<END
#0403
<KEY<MS2TELEPORTER ERROR! PLEASE CONTACT
YOUR LOCAL ADMINISTRATOR.<NOD<CLO<END

#0500
<KEY<SKJ0030:0530<SKJ0031:0531
<SKJ0040:0540<SKJ0041:0541
<MS3Use this to continue once you have
reached a checkpoint.<NOD<DNP0500<END

#0530
<FMU<AE+<FL-1000<WAI0015<FAO0004<TRA0003:0201:0010:0008
#0531
<FMU<AE+<FL-1000<WAI0015<FAO0004<TRA0006:0201:0011:0011
#0540
<FMU<AE+<FL-1000<WAI0015<FAO0004<TRA0010:0202:0011:0008
#0541
<FMU<AE+<FL-1000<WAI0015<FAO0004<TRA0013:0201:0011:0010

Also, the "head" script which includes the death code (probably unnecessary but included just in case):
Code:
#0000
<END

#0001
<PRI<MSGEmpty.<NOD<END

#0016
<PRI<MSG
Do you want to save?<YNJ0000<FL+0431<SVP<CLRGame saved.<NOD<END

#0017
<PRI<FLJ0201:0018
<LI+1000<SOU0020<AE+<MSG
Health refilled.<NOD<END
#0018
<PRI
<LI+1000<SOU0020<AE+<MSG
Health and missiles refilled.<NOD<END

#0019
<KEY<MSG
Do you want to rest?<YNJ0000<FAO0004<CMU0000<WAI0020<CLR.....<NOD<CLO
<WAI0050
<LI+1000<SOU0020<MYD0002<MSG
Health restored.<NOD<CLO<RMU<FAI0004<END

#0030
<PRI<FLJ0202:0032<FLJ0201:0031<FL+0201<GIT0005<AM+0005:0010
<CMU0010Got the =Missile Launcher=!<WAI0160<NOD<RMU<CLRThe Missile Launcher is a powerful
weapon, but its ammo is limited.<NOD
You can replenish your stockpile
with items dropped by enemies.<NOD<END
#0031
<PRI<AM+0005:0005<MSG
<GIT0006Max missiles increased by <NUM0000!<NOD<END
#0032
<PRI<AM+0010:0005<MSG
<GIT0011Max missiles increased by <NUM0000!<NOD<END

#0040
<KEY<CMU0000<WAI0040
<PRI<WAI0040
<ITJ0004:0041<ITJ0003:0042
<CMU0003<MSG
GAME OVER!<NOD<CLR
Return to the stage select?<YNJ0049<CLO
<FAO0001<SK-0000<SK-0001<SK-0002<SK-0010<SK-0011<SK-0012
<SK-0030<SK-0031<SK-0040<SK-0041<SK+0020
<WAI0050<FLJ0431:0048<INI<END
#0041
<CMU0011
<SKJ0000:0043<SKJ0010:0043
#0042
<CMU0010
<SKJ0000:0043<SKJ0010:0043
#0043
<MSG
Continue?<YNJ0049<CLO<FAO0004
<FLJ0431:0048<INI<END

#0048
<SMC<LDP<END

#0049
<CLO<FAO0004<ESC


XX: head.tsc   4000 - 4099
4000:Almond…“ï
 
Apr 4, 2014 at 12:15 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
What about the script where you are checking for flag 1200?
 
Apr 9, 2014 at 1:28 AM
Tommy Thunder
Discord Group Admin
Org Discord Moderator
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 24, 2011
Location: New Westminster, BC
Posts: 1368
Age: 28
GIRakaCHEEZER said:
What about the script where you are checking for flag 1200?
I check for it both in event #0400 of the first script, and event #0250 of the third script.
________

So, has nobody found out what's wrong in the script? I suppose I'll just continue doing some trial-and-error myself, but if a solution is found, I'd really like to know. The flag is literally never unset, so I'm just baffled at what it could be.
 
Apr 9, 2014 at 2:33 AM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
have you tried a different flag
maybe 1200 is used by the death sequence somehow idfk it's worth a shot if you haven't tried it.
 
Apr 9, 2014 at 3:50 AM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1640
Age: 26
There are also some other evil flags that don't work.

(I can't think of what ones though)
okay, I've officially confused myself with velocities.

I'm trying to make a circling NPC here's what I've got.

offset NPC042

#define
L_framerect_distance = 0
U_framerect_distance = 0
sprite heigth = 10
sprite width = 10
half half time = 20
half time = 40
full time = 80
move_speed = 1


#enddefine

push ebp
mov ebp,esp
sub esp,10

mov dword [EBP-10],0
mov dword [EBP-C],0
mov dword [EBP-8],0
mov dword [EBP-4],0
setpointer

:StateCircle
inc npc.objecttimer
cmp npc.objecttimer, half time
jg :move_R

;move_L
add npc.moveX, -move_speed
jmp :StateCircle2


:move_R
cmp npc.objecttimer, full time
jg :reset_L_R
add npc.moveX, move_speed
jmp :StateCircle2

:reset_L_R
mov npc.objecttimer, 0
jmp :StateCircle

;---------------------------------


:StateCircle2
jmp :render
inc npc.directive
cmp npc.directive, half half time ;before the UD kicks in so we get a circle instead of a diagonal line
jl :render


:StateCircle3
inc npc.scripttimer
cmp npc.scripttimer, half time
jg :move_U

;move_D
add npc.moveY, move_speed
jmp :render

:move_U
cmp npc.scripttimer, full time
jg :reset_U_D
add npc.moveY, -move_speed
jmp :render

:reset_U_D
mov npc.scripttimer, 0
jmp :StateCircle3


:render
;add vels
mov eax, npc.moveX
mov edx, npc.moveY
add npc.X, eax
add npc.Y, edx

mov eax, npc.framenum
imul al, al, sprite width
add eax L_framerect_distance
mov npc.DisplayL,eax
add eax, sprite width
mov npc.displayR,eax
mov eax, U_framerect_distance
mov npc.displayU,eax
add eax, sprite heigth
mov npc.displayD,eax

:end_of_code
mov esp, ebp
pop ebp
retn


I can't seem to get the formula correct. :/
 
Apr 9, 2014 at 5:01 AM
Giving it my all and shooting for the moon.
Modding Community Discord Admin
"What're YOU lookin' at?"
Join Date: Apr 23, 2013
Location: In a cave above the surface.
Posts: 1069
Age: 26
The only flags you really don't want to mess with are flags:
0000 and 8000 (which aren't really data set aside for flags, but rather other bytes commonly mistaken for available flags.)
And 4000... I think... Which bypasses the default drowning script unless you undid that jump in the head script.

Plus he has mentioned that he tried other flags in their place, and that they don't work as well. I doubt the problem consists in something like that.

--- Tpcool, could you perhaps list the Assembly edits you have (as some use flag data to save variables).
I'm going to skim through your scripts in a minute to see if your profile isn't saved when you think it is, and if nothing is found I have some other debugging ideas for you.

Edit: Didn't quite see anything, but on a complete out-field whim here I suggest you mess with event #0041 and #0042 in the head script, as I'm not sure how safe "SkipFlag 0000" is, and they don't end in an <END, though I doubt these two things will fix anything.

And lastly, if you open up your mod in Booster's Lab, and click on Actions > Generate Flag List, it will create a .txt file in the Booster's Lab directory that lists every single flag in your mod, with all the sets, jumps, and unsets in every script file. I'd do this and check the list just to MAKE SURE that it isn't unset anywhere (it's easy to mistype a flag to have it accidentally affect another one).

This is a peculiar case indeed.
 
Apr 9, 2014 at 3:00 PM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Jan 21, 2007
Location:
Posts: 1111

Here's the issue.


Code:
#0210
<KEY<HMC<CMU0004<FL+1000
<FAI0003<MNA
<WAI0025<EQ+0064
<MYD0000<MOV0009:0000<SMC<WAI0079
<LI+9999<EQ-0064<ANP0000:0010:0000
<TAM0006:0002:0000<TAM0008:0003:0000<TAM0011:0004:0000
<MYD0002<AE+<FL+1200<SVP<END **************************************

#0220
<KEY<HMC<CMU0004<FL+1000
<FAI0003<MNA
<WAI0025<EQ+0064
<MYD0000<MOV0009:0000<SMC<WAI0079
<LI+9999<EQ-0064<ANP0000:0010:0000
<TAM0006:0002:0000<TAM0008:0003:0000<TAM0011:0004:0000
<MYD0002<AE+<FL+1300<SVP<END **************************************

[.......]

#0040
<KEY<CMU0000<WAI0040
<PRI<WAI0040
<ITJ0004:0041<ITJ0003:0042
<CMU0003<MSG
GAME OVER!<NOD<CLR
Return to the stage select?<YNJ0049<CLO
<FAO0001<SK-0000<SK-0001<SK-0002<SK-0010<SK-0011<SK-0012
<SK-0030<SK-0031<SK-0040<SK-0041<SK+0020
<WAI0050<FLJ0431:0048<INI<END *************************************

#0043
<MSG
Continue?<YNJ0049<CLO<FAO0004
<FLJ0431:0048<INI<END *********************************************

#0048
<SMC<LDP<END


Do you see the two "<FLJ0431:0048" in #0040 and #0043? Flag 0431 is set by the original event #0016. It tells the game to load your profile the next time you die (See #0048). If 0431 isn't set (As is the case in your custom save event), it simply INItiates the save file. Nothing is wrong with flag 1200 itself.

Also wondering why #0041 and #0042 don't have an <END at the end, but w/e.
 
Apr 10, 2014 at 12:47 AM
Tommy Thunder
Discord Group Admin
Org Discord Moderator
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 24, 2011
Location: New Westminster, BC
Posts: 1368
Age: 28
Do you see the two "<FLJ0431:0048" in #0040 and #0043? Flag 0431 is set by the original event #0016. It tells the game to load your profile the next time you die (See #0048). If 0431 isn't set (As is the case in your custom save event), it simply INItiates the save file. Nothing is wrong with flag 1200 itself.
Oh, alright. Thanks! I guess I should have figured out everything about the death script before modifying it, as I have always been clueless about flag #0431 (I guess I left that jump in as a precaution, but it's never set with the way I have it(?)). This has definitely started confusing my plans with the skipflags I currently have in place...

Also wondering why #0041 and #0042 don't have an <END at the end, but w/e.
With the way that they're set up, it's never going to reach the point where it'd need an <END command. It'd probably be just as glitchy to have it there considering where in the script it is.
 
Apr 12, 2014 at 11:29 PM
Neophyte Member
"Fresh from the Bakery"
Join Date: Apr 12, 2014
Location:
Posts: 4
I want to ask some questions:

-Is it possible to change the main character's sprite's size (and not always, but also keep it in a playable dimension (I.E. No giants flooding the screen)?) I don't want to just scale it, I want it to be adjustable on height AND width.

-How do I make a event change the sprite of the main character?
(Like the protagonist is on Sprite A, then Event X happens, then the protagonist is on Sprite B?)

EDIT: What I meant above is for sprite to sprite on the same spritesheet, AND jumping between two different spritesheets (I want to figure out the latter)

I use CaveEditor.

And is this possible on TSC? If not, then Assembly?
 
Apr 13, 2014 at 6:01 AM
Been here way too long...
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Oct 7, 2013
Location: India
Posts: 505
It would be possible to change the framerects for Quote through assembly, but you would have to find the right offsets for it. Must be somewhere if you look hard enough.
For changing the sprite of Quote directly in-game, use the <ANP command to give Quote some animation or <MYD to change the direction. If you want to equip the Mimiga Mask (or whatever different sprites you've changed that to) then use <EQ+0064.
Oh, and welcome to the forums!
 
Apr 13, 2014 at 1:17 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
For the second part, not quite. You can't animate the PC except with a couple other commands. The trick is to use npc 150 instead - hide the PC with <HMC and use <CNP to change a blank entity to NPC 150. (150 will retain the appearance of the PC afaik (including mimiga mask applications) and can be animated)
 
Apr 14, 2014 at 1:07 AM
scrungy
Bobomb says: "I need a hug!"
Join Date: Oct 7, 2011
Location: PrtWeed
Posts: 777
Age: 24
I'm working on a super-secret project and I have a bit of concern.
Is there any possible way to use ASM or something to stop this from happening on
slopes?
diph.php

I need to have this tiletype be behind the player (or just the non-walkable part)
 
Apr 15, 2014 at 4:31 AM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1640
Age: 26
Aar said:
I'm working on a super-secret project and I have a bit of concern.
Is there any possible way to use ASM or something to stop this from happening on
slopes?
diph.php

I need to have this tiletype be behind the player (or just the non-walkable part)
I'm no master with tiles, but I think the only way to do this is to incorporate it into the Background like JN does.
 
Apr 15, 2014 at 4:03 PM
scrungy
Bobomb says: "I need a hug!"
Join Date: Oct 7, 2011
Location: PrtWeed
Posts: 777
Age: 24
Bombchu Link said:
I'm no master with tiles, but I think the only way to do this is to incorporate it into the Background like JN does.

Seeing as this part of the map scrolls, I'm probably gonna have to cut it short. Thanks!
 
Top