Guest Access
Go to page : 1, 2, 3, 4
Active Member
Active Member
![Active Member Active Member](https://2img.net/u/3113/12/83/19/album/active13.gif)
Active Member
profile
It's kind of hard to follow the vids when he's only using RMVX or higher. That's why I'm sort of confused on all of the topics.
Noob, nerd, or geek aren't a set of my favorite words...
handy333
![]() | ![]() | |
![]() | ||
![]() | ![]() |
![Active Member Active Member](https://2img.net/u/3113/12/83/19/album/active13.gif)
profile
![](https://2img.net/u/3113/12/83/19/album/quote_13.png)
Noob, nerd, or geek aren't a set of my favorite words...
Active Member
Show Signature
Administrator
Administrator
![Administrator Administrator](https://2img.net/u/3113/12/83/19/album/g101_p11.gif)
Administrator
profile
what vids are you talking about?
is there a script that you are currently using, editing, trying to make?
maybe we can break down a few lines with comments to understand/learn some more... ?
G@MeF@Ce
![]() | ![]() | |
![]() | ||
![]() | ![]() |
![Administrator Administrator](https://2img.net/u/3113/12/83/19/album/g101_p11.gif)
profile
![](https://2img.net/u/3113/12/83/19/album/quote_13.png)
is there a script that you are currently using, editing, trying to make?
maybe we can break down a few lines with comments to understand/learn some more... ?
Administrator
Show Signature
Active Member
Active Member
![Active Member Active Member](https://2img.net/u/3113/12/83/19/album/active13.gif)
Active Member
profile
I'm working on a padlock system for my one of my training project games here's the code:
There are probably millions of things wrong with this but I got what I needed to work, now what I'm trying to do is make the coordinates display on a window so the player could see what they inputed.
handy333
![]() | ![]() | |
![]() | ||
![]() | ![]() |
![Active Member Active Member](https://2img.net/u/3113/12/83/19/album/active13.gif)
profile
![](https://2img.net/u/3113/12/83/19/album/quote_13.png)
- Code:
class Pad
def initialize(com, angle = 0)
$angle = angle
@com = com
@times = -1
@combo = []
@close = false
main
end
def main
@show = Viewport.new(0, 0, 640, 480)
@show.z = 3
@back = Sprite.new(@show)
@back.bitmap = RPG::Cache.picture("Lock-back")
@back.x = 87
@back.y = 7
@mid= Sprite.new(@show)
@mid.bitmap = RPG::Cache.picture("Lock-Dial")
@mid.x = 320
@mid.y = 240
@mid.ox = 150.5
@mid.oy = 152
@glint = Sprite.new(@show)
@glint.bitmap = RPG::Cache.picture("Lock-Glint")
@glint.x = 319
@glint.y = 176
@glint.opacity = 150
@stats_window = Results.new
@stats_window.back_opacity = 130
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if @close == true
break
end
end
@back.dispose
@mid.dispose
@glint.dispose
@stats_window.dispose
end
def update
@back.update
@mid.update
@glint.update
if Input.press?(Input::LEFT)
$angle = @mid.angle += 1.to_i
Audio.se_play("Audio/SE/032-Switch01", 70, 0) rescue nil
if @mid.angle >= 1
@mid.angle = 0
Audio.se_stop
end
end
if Input.press?(Input::RIGHT)
$angle = @mid.angle += -1.to_i
Audio.se_play("Audio/SE/032-Switch01", 70, 0) rescue nil
if @mid.angle <= -319
@mid.angle = -318
Audio.se_stop
end
end
if Input.trigger?(Input::R)
$angle = @mid.angle += -50
Audio.se_play("Audio/SE/032-Switch01", 70, 0) rescue nil
if @mid.angle <= -318
@mid.angle = -318
$angle = -318
end
end
if Input.trigger?(Input::L)
@angle = @mid.angle += 50
Audio.se_play("Audio/SE/032-Switch01", 70, 0) rescue nil
if @mid.angle >= 1
@mid.angle = 0
@angle = 0
end
end
if Input.trigger?(Input::B)
@back.dispose
@mid.dispose
@glint.dispose
@close = true
end
if Input.trigger?(Input::C)
p @angle
ini = @angle.to_a
@times += 1
if @times == 2
@times = 0
if @com == @combo
p "Got it!"
Audio.se_play("Audio/SE/054-Right01", 70, -100) rescue nil
@back.dispose
@mid.dispose
@glint.dispose
@close = true
else
Audio.se_play("Audio/SE/057-Wrong01", 70, -100) rescue nil
@combo.clear
end
end
case @times
when 0
@combo += ini
p @combo
when 1
@combo += ini
p @combo
when 2
@combo += ini
p @combo
end
end
end
end
class Results < Window_Base
def initialize
super(0, 0, 130, 130)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.color = system_color
self.contents.draw_text(0, 0, 130, 130,"")
end
end
There are probably millions of things wrong with this but I got what I needed to work, now what I'm trying to do is make the coordinates display on a window so the player could see what they inputed.
Active Member
Show Signature
EVENTALIST
EVENTALIST
![EVENTALIST EVENTALIST](https://2img.net/u/3113/12/83/19/album/wiggle12.gif)
EVENTALIST
profile
Handy, do you still need help with this? It's been a while since i've had internet.
Also noob is just a word, when i programed my first window it was the title of the window class i chose because it seemed fitting. Much like 'Hello world' to me words dont have meaning unlesss you put meaning behind them. But much like that meaning influences emotions it can also be a driving force to learn.![Smile](https://2img.net/i/fa/i/smiles/icon_smile.gif)
I think i'll try to include 'noob' somewhere in my next script title, because why not? A_Noob_Made_Extractor.
But serriously, dont be afraid to ask questions if you still have any.
mr_wiggles
![]() | ![]() | |
![]() | ||
![]() | ![]() |
![EVENTALIST EVENTALIST](https://2img.net/u/3113/12/83/19/album/wiggle12.gif)
profile
![](https://2img.net/u/3113/12/83/19/album/quote_13.png)
Also noob is just a word, when i programed my first window it was the title of the window class i chose because it seemed fitting. Much like 'Hello world' to me words dont have meaning unlesss you put meaning behind them. But much like that meaning influences emotions it can also be a driving force to learn.
![Smile](https://2img.net/i/fa/i/smiles/icon_smile.gif)
I think i'll try to include 'noob' somewhere in my next script title, because why not? A_Noob_Made_Extractor.
But serriously, dont be afraid to ask questions if you still have any.
![Smile](https://2img.net/i/fa/i/smiles/icon_smile.gif)
EVENTALIST
Show Signature
EVENTALIST
Go to page : 1, 2, 3, 4