プレイ日記
King 5kittens645
Ok, i really need help with this. So I'm trying to make a function where once you unlock a door, it stays unlocked, and then you go through it and you can go back through the door to go back to where you last were, but i can't get it to work... (Again, if you must know I'm trying to edit Dungeon tanken or "GAME2RPG" in the "SYS" file)
1そうだね
プレイ済み
返信[1]
親投稿
Darkcon SGMXZYDarkcon354
good you asked so your having trouble understanding how NMAP works. I will explain in detail how it was written and how the game uses it to show sprite, art by gline gbox, ect, when a player moves around in the maze. remember it a illusion too the players one point prespective of direction. there will be many post to complete topic here.
0そうだね
プレイ済み
返信[2]
親投稿
Darkcon SGMXZYDarkcon354
lesson 1 understanding NMAP basic's in game2rpg
0そうだね
プレイ済み
返信[3]
親投稿
Darkcon SGMXZYDarkcon354
sorry had to make drawing. anyway, nmap(x,x) works like this if nmap is nmap(0,1) then it read block player on, you wouldn't want a sprite on the player they won't see it. but you would for trigger a event to happen.
0そうだね
プレイ済み
返信[4]
親投稿
Darkcon SGMXZYDarkcon354
now how game was wrote is fine as is and simple it show no matter if your N,S,E,W of a treasurebox, ect. you would never veiw a door right as it is coded right now. as we know now a player point is always nmap(0,1) no matter what right, good.
0そうだね
プレイ済み
返信[5]
親投稿
Darkcon SGMXZYDarkcon354
you ask how is that? well it a veiw point of distance of object like treasure chest by 3 space ahead of player really their is 4 spaces ahead tho. so if you look at @MAP1 you will see different numbers in the data of map1 right those are points of reference on the map like a wall or ladder,ect. nmap read distance of let say 2 which is a ladder, if player is 3 spaces away from the number 2=ladder
0そうだね
プレイ済み
返信[6]
親投稿
Darkcon SGMXZYDarkcon354
it will show if player look at it. now look at the chart i made sorry it not the best looking chart but it will do for the time being. notice the chart layout it's to give you a visual idea of how nmap works when your coding a door ect. but more on that latter. anyway if you noticed how in game2rpg is coded at @drawitem
0そうだね
プレイ済み
返信[7]
親投稿
Darkcon SGMXZYDarkcon354
it pretty simple to understand it with a chart I made for you. so let break down the code to understand it because the chart has more to say that the code in game doen't tell you straight out. Why is that you may ask?
0そうだね
プレイ済み
返信[8]
親投稿
Darkcon SGMXZYDarkcon354
lets take a little break to scream Why???, before I finish lesson 1, ;p be back in 20min.
0そうだね
プレイ済み
返信[9]
親投稿
Christofer avalack
what did you use to draw that????
0そうだね
プレイ済み
返信[10]
親投稿
Darkcon SGMXZYDarkcon354
red glasses
0そうだね
プレイ済み
返信[11]
親投稿
Darkcon SGMXZYDarkcon354
it was made for smilebasic
0そうだね
プレイ済み
返信[12]
親投稿
Darkcon SGMXZYDarkcon354
anyway back to lesson 1 NMAP(x,x) basic's to game2rpg
0そうだね
プレイ済み
返信[13]
親投稿
Darkcon SGMXZYDarkcon354
this is the original code to game2rpg in image. I add comment for you to key points to understand. now if you looked at it, you will see a label called @DRAWITEM SPCLR 1 & 2 it to clear sprite 1&2 only. what it ready saying clear sprite control manage number 1 & sprite control manage number 2 next you got a for loop FOR I=1 TO 2 So I will be 1 then it will be 2 when it read.
0そうだね
プレイ済み
返信[14]
親投稿
Darkcon SGMXZYDarkcon354
next you will see ID=NMAP(I,1) it saying ID will equal value of NMAP[1,1] or NMAP[2,1] oh a remember NMAP[x,x] is a variable. and I'm aware I typed NMAP(x,x) before just now it is correct for PTC but SB it NMAP[x,x].
0そうだね
プレイ済み
返信[15]
親投稿
Darkcon SGMXZYDarkcon354
next you see IF ID==0 THEN CONTINUE. What it saying is if it null or 0 for another words to continue on don't show anything because nothing is near player point of view. next is IF ID==1 THEN BREAK 'WALL it saying stop for loop return to what it was doing before for loop was started because a wall is there. next your see IF ID>=3 THEN SPSET I,0 'TREASURE
0そうだね
プレイ済み
返信[16]
親投稿
Darkcon SGMXZYDarkcon354
here it saying NMAP told ID that @map1 said 3 or higher to 9 is near so show sprite from @SPDATA, to show treasure chest. Note here you can do it manually too, by not reading from @SPDATA.
0そうだね
プレイ済み
返信[17]
親投稿
Darkcon SGMXZYDarkcon354
here I said you can do it manually I would do this. IF ID<=3 THEN SPSET I,256,80,16,16,1 'TRESURE what I said is I equals 1 or 2 for sprite control number,i want treasure sprite located on spritesheet at 256,80, 16 height,16 width,show sprite true. you can get location to sprite you want to add by using smile tool's paint just set mode to 16 move red box aline top left corner to the sprite.
0そうだね
プレイ済み
返信[18]
親投稿
Darkcon SGMXZYDarkcon354
and write down location so you can add it to spset. lesson one not complete but it should help for right now. and i'm out of posts for day.
0そうだね
プレイ済み
返信[19]
親投稿
Darkcon SGMXZYDarkcon354
and yes this tutorial will cover going back and forth through a door and locking,unlocking, and keeping that door unlock. lol so stay tune, plz!
1そうだね
プレイ済み
返信[20]
親投稿
Darkcon SGMXZYDarkcon354
correcting I would do this IF ID<=3 THEN SPSET I,256,80,16,16,1 'TREASURE had typo the correct way is IF ID>=3 THEN SPSET I,256,80,16,16,1
0そうだね
プレイ済み
返信[21]
親投稿
Darkcon SGMXZYDarkcon354
here's updated NMAP[DIAGRAM,CHART ] for Game2rpg NMAP[0,1] is always players block...
0そうだね
プレイ済み
返信[22]
親投稿
King 5kittens645
I don't think you explained how to fix my unlocking doors problem. Maybe you did and i just didn't see it but I'm pretty sure you never explained it because that's all i needed to know.
0そうだね
プレイ済み
返信[23]
親投稿
Darkcon SGMXZYDarkcon354
your right haven't got to it yet. first you need to understand the chart I made over 2 and half years ago to show doors and art overlay sprites ect. now to lock,unlock doors to go through you will need to make a variable for both locked and unlocked doors me I used ULD[1] for a true or false. updated the map for more options at @map1, rewrote nmap detection.
0そうだね
プレイ済み
返信[24]
親投稿
Darkcon SGMXZYDarkcon354
right now writing a test module for doors a other little tricks I did in my game so you can learn from it and it will be heavy commented. I should have it done by august 1 I hope, I'm doing it on my hobbie time because I do got a family and job take comes first!
1そうだね
プレイ済み
返信[25]
親投稿
Darkcon SGMXZYDarkcon354
hum, thought I typed, that comes first not take come first, oh the typo's I do on this device bug me. need a pc keyboard.
0そうだね
プレイ済み
返信[26]
親投稿
Darkcon SGMXZYDarkcon354
that teach me for not proof reading before posting.
0そうだね
プレイ済み