May 23, 2014 at 9:50 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 30
Bombchu Link said:
I could also use some assistance.

Code:
:StateBluefoesxor eax, eaxinc npc.scripttimercmp npc.scripttimer, blue foe spawn waitjl :rendermov npc.scripttimer, eaxinc npc.objecttimercmp npc.objecttimer, blue foe pairsjl :not_max_Bfoe_pairmov npc.moveset, eaxmov npc.objecttimer, eaxmov npc.directive, eaxmov npc.scriptstate, 5:not_max_Bfoe_pairpush 100push eaxpush eax ;directionpush eaxpush eax;---------------cmp localvar2, 1jge :2nd_timemov eax, BfoespawnY1mov edx, BfoespawnX1jmp :spawn_bfoe_area:2nd_timemov eax, BfoespawnY2mov edx, BfoespawnX2:spawn_bfoe_area;---------------push eax ;ypospush edx ;xpospush blue_foe_spawn_num        call 46efd0      add esp,20inc localvar2cmp localvar2, 2jle :not_max_Bfoe_pairxor eax, eaxmov npc.moveset, eaxjmp :render

the above code is suppose to spawn blue enemies in two different locations every X frames until the objecttimer is full and then the boss returns back to the main state.

The code was working earlier, but since I added the part with the script/object timer, it's not working properly, it's only spawning foes at the first location.

And then when I removed that section of the code it's still not working. It's as if localvar2 isn't responding, but when I changed it to frame timer it still wouldn't work.

Help?
Try setting localvar2 to 0 before the line "jl :not_max_Bfoe_pair".
 
May 23, 2014 at 10:50 PM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1638
Age: 25
Try setting localvar2 to 0 before the line "jl :not_max_Bfoe_pair".


that didn't work, but I did find out this.



Code:
StateBluefoes
xor eax, eax
inc npc.scripttimer
cmp npc.scripttimer, blue foe spawn wait
jl :render

mov npc.scripttimer, eax

inc npc.objecttimer
cmp npc.objecttimer, blue foe pairs
jl :not_max_Bfoe_pair

mov npc.moveset, eax
mov npc.objecttimer, eax
mov npc.directive, eax
mov npc.scriptstate, 5
:not_max_Bfoe_pair

push 100
push eax
push eax ;direction
push eax
push eax
;---------------
mov eax, BfoespawnY1
mov edx, BfoespawnX1
;/---------------
push eax ;ypos
push edx ;xpos
push blue_foe_spawn_num        
call 46efd0      
add esp,20
;-----------------------------


push 100
push eax
push eax ;direction
push eax
push eax
;---------------
mov eax, BfoespawnY2
mov edx, BfoespawnX2
;/---------------
push eax ;ypos
push edx ;xpos
push blue_foe_spawn_num        
call 46efd0      
add esp,20
setpointer
jmp :render



This is getting ridiculous.



EDIT: It was my buggy .exe and the evil WAV ORG hack



I had to deal with that on top of a null npc that would deliver "-_457" damage, a fireplace that changes it's framerects and a buggy <CNP and <ANP that would only work with 1 NPC



And to top it all off, a smoke entity that likes the teleport menu bit map better then npcsym.bmp





EDIT EDIT: actually I forgot to xor eax before the function so the direction a parent and stuff was same as the Ypos to spawn at...oops


 
May 25, 2014 at 10:37 PM
Senior Member
"Wahoo! Upgrade!"
Join Date: Aug 28, 2013
Location: Somewhere in the Seal Chamber
Posts: 55
Age: 31
Code:
<KEY<MYD0001<DNP0200<MSG[blah]<NOD
<CLR<FAC0015[blah]<NOD<CLR<FAC0000[blah]<NOD
<CLR<FAC0026[blah] Now, DIE!<NOD<CLO<HMC<CNP0001:0150:0001<CNP0100:0147:0000<ANP0001:0000:0001<END
that second CNP is supposed to summon lightning, but does not (there exists an entity with ID 100), is there anything extra needed?
 
May 25, 2014 at 10:43 PM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1638
Age: 25
Code:
<KEY<MYD0001<DNP0200<MSG[blah]<NOD
<CLR<FAC0015[blah]<NOD<CLR<FAC0000[blah]<NOD
<CLR<FAC0026[blah] Now, DIE!<NOD<CLO<HMC<CNP0001:0150:0001<CNP0100:0147:0000<ANP0001:0000:0001<END
that second CNP is supposed to summon lightning, but does not (there exists an entity with ID 100), is there anything extra needed?


The lightning entity is 146 iirc.
 
May 25, 2014 at 10:50 PM
Senior Member
"Wahoo! Upgrade!"
Join Date: Aug 28, 2013
Location: Somewhere in the Seal Chamber
Posts: 55
Age: 31
Fixed that, finished the script, still doesn't show up. PC just goes invisible, delay, fade out to next area.
 
May 25, 2014 at 11:30 PM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1638
Age: 25
Samario said:
Fixed that, finished the script, still doesn't show up. PC just goes invisible, delay, fade out to next area.
are you sure that the NPC that you desire to change to lightning is set to event #100?
 
May 25, 2014 at 11:31 PM
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: 1042
Age: 24
Can we see the finished script? (You might have changed something to make it not appear).

EDIT: Before doing that make sure:
- That you entered "100" as the event #, not the flag association.
- That its actually loaded (as in if you have it appear/disappear on flag set, that those flags actually are set/unset).
 
May 26, 2014 at 2:00 AM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4485
I'm pretty sure I remember 147 as lightning but I might be wrong. Also just use <SNP, it works better and might solve your problem.
 
May 26, 2014 at 5:31 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: 1042
Age: 24
This is from a guy who bathes in this stuff, so don't take personal offense :3

- My offhand memory is telling me it's 146 for instant and 333 for timed (I'm on mobile so let me check............ Yep it is 146).

- SNP is a diffrent command from CNP, so I hardly think it's possible to be better (and sometimes you would rather place a null instead of hunting for coordinates, or maybe you need to refer to the entity you create [though that's not the case with lightning so either is a valid option]).

- If the <SNP fixes his problem, then what me and Bombchu have been suggesting is very likely the actual solution (cause we were asking him the verify his null was correct).
 
May 26, 2014 at 11:56 AM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4485
<SNP allows instant creation of an entity anywhere within the map without prior entity placement and can be used to unclutter the map with blank entities waiting to be turned into various things used for a split second.

Edit: I'm saying <SNP is better for this situation, not in general.
 
May 26, 2014 at 5:29 PM
Junior Member
"Fresh from the Bakery"
Join Date: May 24, 2014
Location: Saint-Petersburg
Posts: 12
Can i modify text at the intro? (Replace "Studio Pixel presents" to "Blah" for example?)
 
May 26, 2014 at 6:08 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4485
Change "u" to whatever you want it to display. (The u(Kings) map is the title map)
 
May 27, 2014 at 10:18 PM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1638
Age: 25
Code:
offset NPC041

#define
L_framerect_distance = 30
U_framerect_distance = 40
sprite_width         = 10
sprite_heigth        = 10
MinXvel              = 50
MinYvel              = 30
MaxXvel              = 200
MaxYvel              = 300
max frames           = 4
#enddefine

push ebp                          
mov ebp, esp  
sub esp, 10
xor eax, eax
mov dword [EBP-10],eax    
mov dword [EBP-C],eax   
mov dword [EBP-8],eax   
mov dword [EBP-4],eax
setpointer
mov eax, npc.scriptstate
jmp [eax*4+:StateTable]


;----------------------------------------
:state0        
push MinXvel
push MaxXvel
call RANDOM
add esp, 8     
setpointer
mov npc.MoveX, eax
push MinYvel
push MaxYvel
call RANDOM
add esp, 8  
setpointer
cmp npc.direction, 0
jne :right_fling
neg eax
:right_fling
mov npc.MoveX eax
mov npc.scriptstate, 1
jmp :add_vels
;----------------------------------------
:state1
inc npc.scripttimer
cmp npc.scripttimer, 400
jl :add_vels
mov npc.inuse, 0
jmp :end_of_code
;----------------------------------------

:add_vels
setpointer
mov edx, npc.MoveX          ;THIS LINE CRASHES THE GAME
add npc.X edx
mov edx, npc.moveY
add npc.Y edx

inc npc.frametimer
cmp npc.frametimer, 6
jl :render
inc npc.framenum
cmp npc.framenum, max frames
jl :render
mov npc.framenum, 0


:render
xor edx, edx                              
mov edx, npc.framenum               
imul dl, dl, sprite_width
mov npc.DisplayL,edx                    
add edx, sprite_width                          
mov npc.displayR,edx    
mov dl, U_framerect_distance
cmp npc.direction, 2                     
jne :render_left
add edx sprite_heigth
:render_left      
mov npc.displayU, dl                   
add dl, sprite_heigth                          
mov npc.displayD, dl   

:end_of_code
mov esp, ebp
pop ebp
retn


:StateTable
print :State0        ;<ANP0000
print :State1        ;<ANP0001






I have no Idea why but the above code it crashing the game. olly keeps telling me that the line marked (in comments) is crashing.



also "moveX" is the part that's crashing the game, I tried changing the variable on the receiving end, but it still doesn't work.





I can confirm that it's not the Random numbers above, I NOP'ed it out and the crashing still happened.

I can confirm that it's not the Parent entity, it worked just fine with the old NPC before I replaced the code.





Help?


 
May 27, 2014 at 11:03 PM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Jun 26, 2013
Location: No Idea...
Posts: 20
. I'm developing a mod and I have an issue. I changed the door in start point to go to map 84 (Passage?) and when the door is used it gives a blank black screen. I used haydenstudio's door tutorial in noxid's modding tutorial thread. Any help?
 
May 27, 2014 at 11:39 PM
Based Member
"Life begins and ends with Nu."
Join Date: Dec 31, 2011
Location: United States
Posts: 2261
Age: 26
Double check to make sure that the event for the next room linked to in your <TRA command links to the correct event in the room that you transition to, and that it has its proper <FAI command on the other end. If this problem persists, then please paste your scripts here.

Also, next time, please post this in the Quick Modding/Hacking Answers Thread, rather than starting a new thread entirely.
 
Last edited by a moderator:
May 28, 2014 at 12:15 AM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Jun 26, 2013
Location: No Idea...
Posts: 20
Ok thanks, will post there next time.
 
May 28, 2014 at 4:00 PM
Junior Member
"Fresh from the Bakery"
Join Date: May 24, 2014
Location: Saint-Petersburg
Posts: 12

Maybe i just do something wrong, but when i placed Omega at the my custom map it's looks is here, but when boos fight begins, nothing happend. I hear sound how Omega is shooting. I totally copied that thing from Sand Zone, (with all entities) i don't see him. Code:
#0200
<KEY<SKJ0007:0201<SK+0007<EVE0202
#0201
<SAT<EVE0202
#0202
<KEY<MYD0002<DNP0200<FMU<WAI0100
<MS3I see Balrog failed in
his duty...<CMU0000<NOD<CLO
<CNP0206:0067:0000<WAI0010<WAI0090
<ANP0206:0013:0000
<MS3<FAC0015Hmmmm...<NOD<CLRYou look like quite a
fighter.<NOD<CLRBut at this juncture,
you're proving yourself
rather a nuisance.<NOD<CLR<FAC0016Shall we settle this?<NOD<CLO<FAC0000
<QUA0050<WAI0020
<MS3
?!<WAI0050<NOD<CLR<FAC0015No, there's no need
for me to get involved.<NOD<CLO<ANP0206:0020:0000
<BOA0020<CMU0032<BSL0000<FON0210,0016
<SMP0210:0010<SMP0210:0011<END
#0201
#0202
#0203
#0204
#0205
#0206
#0210
<KEY<WAI0250<CMU0000
<MS3<CMU0015
Defeated Omega!<WAI0160<NOD<CLRThe spell on the Sunstones has
been lifted.<NOD<CLO
<FOM0016<CMU0006
<SMP0210:0010<SMP0210:0011<END
<END
I can give you mod, if you can't explaint it here.
 
May 28, 2014 at 4:32 PM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1638
Age: 25
I'm pretty sure that special bosses stay at the Same X and Y position on spawning and don't automatically change to where you want when you place them on a different map.
 
May 28, 2014 at 8:47 PM
Junior Member
"Fresh from the Bakery"
Join Date: May 24, 2014
Location: Saint-Petersburg
Posts: 12
Bombchu Link said:
I'm pretty sure that special bosses stay at the Same X and Y position on spawning and don't automatically change to where you want when you place them on a different map.
I think about that too... Then how to change the position of the boss? I can try to change it somehow, but I would first of all wanted to know whether there is a special data file Omega.
 
May 28, 2014 at 10:09 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4485
Assembly. I would just change your map to accommodate.
 
Top