Howdy folks,
I got two questions regarding scripts I need some help with.
First of all, probably a simple one for a scripter:
I want to implement a couple of Pokemon Colosseums in my game. However, they differ in difficulty and the player need to have completed the previous Colosseums in order to participate in the next one. For that, I like the player to obtain a Contest Pass or similar, on which this data is saved. First of all, how to check for an item in the back returned True or False? (Kernel.pbCheckItem(PBItem::CONTESTPASS) didn't work. Secondly, how can you programme the progress on an Key item, so it can show the player its progress, plus so you can use it at a front-counter to validize participation.
Second question regards the VS bar.
How do you rewrite the script in a way to add different kinds of bar animations? Like the standard one going in a fast left movement but by different trainers (or colosseum) having it like it was in Pokemon Black/White Plasma team leader?
I got two questions regarding scripts I need some help with.
First of all, probably a simple one for a scripter:
I want to implement a couple of Pokemon Colosseums in my game. However, they differ in difficulty and the player need to have completed the previous Colosseums in order to participate in the next one. For that, I like the player to obtain a Contest Pass or similar, on which this data is saved. First of all, how to check for an item in the back returned True or False? (Kernel.pbCheckItem(PBItem::CONTESTPASS) didn't work. Secondly, how can you programme the progress on an Key item, so it can show the player its progress, plus so you can use it at a front-counter to validize participation.
Second question regards the VS bar.
How do you rewrite the script in a way to add different kinds of bar animations? Like the standard one going in a fast left movement but by different trainers (or colosseum) having it like it was in Pokemon Black/White Plasma team leader?
def show_vs_bar(viewport)
if $vsBar
if $vsBar[0]==true and $vsBar[1]!=nil and $vsBar[2]!=nil
#pbWait(5)
@border=Sprite.new(viewport)
@border.bitmap=BitmapCache.load_bitmap("Graphics/VS/border.png")
@border.y=90
@border.z=99999
@border.visible=false
@left=Sprite.new(viewport)
@left.bitmap=BitmapCache.load_bitmap("Graphics/VS/blue.png")
@left.x=-290
@left.y=104
@left.z=99999
@left.visible=false
@right=Sprite.new(viewport)
@right.bitmap=BitmapCache.load_bitmap("Graphics/VS/red.png")
@right.x=512
@right.y=104
@right.z=99999
@right.visible=false
@light1=Sprite.new(viewport)
@light1.bitmap=BitmapCache.load_bitmap("Graphics/VS/light.png")
@light1.x=-580
@light1.y=104
@light1.z=99999+1
@light1.visible=false
@light2=Sprite.new(viewport)
@light2.bitmap=BitmapCache.load_bitmap("Graphics/VS/light.png")
@light2.x=-1160
@light2.y=104
@light2.z=99999+1
@light2.visible=false
@light3=Sprite.new(viewport)
@light3.bitmap=BitmapCache.load_bitmap("Graphics/VS/light.png")
@light3.x=512
@light3.y=104
@light3.z=99999+1
@light3.visible=false
@light4=Sprite.new(viewport)
@light4.bitmap=BitmapCache.load_bitmap("Graphics/VS/light.png")
@light4.x=1092
@light4.y=104
@light4.z=99999+1
@light4.visible=false
@trainer1=Sprite.new(viewport)
@trainer1.bitmap=BitmapCache.load_bitmap("Graphics/VS/"+$vsBar[1]+".png")
@trainer1.x=-256
@trainer1.y=104
@trainer1.z=99999+3
@trainer1.visible=false
@shadow1=Sprite.new(viewport)
@shadow1.bitmap=BitmapCache.load_bitmap("Graphics/VS/"+$vsBar[1]+".png")
@shadow1.x=10
@shadow1.y=104
@shadow1.z=99999+2
@shadow1.color.alpha=256
@shadow1.opacity=0
@trainer2=Sprite.new(viewport)
@trainer2.bitmap=BitmapCache.load_bitmap("Graphics/VS/"+$vsBar[2]+".png")
@trainer2.x=512
@trainer2.y=104
@trainer2.z=99999+3
@trainer2.visible=false
@shadow2=Sprite.new(viewport)
@shadow2.bitmap=BitmapCache.load_bitmap("Graphics/VS/"+$vsBar[2]+".png")
@shadow2.x=256+10
@shadow2.y=104
@shadow2.z=99999+2
@shadow2.color.alpha=256
@shadow2.opacity=0
@explosion=Sprite.new(viewport)
@explosion.x=128
@explosion.y=37
@explosion.z=99999+4
@VS=Sprite.new(viewport)
@VS.bitmap=BitmapCache.load_bitmap("Graphics/VS/vs.png")
@VS.x=181
@VS.y=150
@VS.z=99999+5
@VS.visible=false
@border.visible=true
@light1.visible=true
@light2.visible=true
@light3.visible=true
@light4.visible=true
@left.visible=true
@right.visible=true
for i in 1..10
@left.x=-290+i*29
@right.x=512-i*29
light_move
pbWait(1)
end
@VS.visible=true
@VS.opacity=3
for i in 1..12
@explosion.bitmap=BitmapCache.load_bitmap("Graphics/VS/e"+i.to_s+".png")
@VS.opacity+=i*21
light_move
pbWait(2)
end
@trainer1.visible=true
@trainer1.color.alpha=256
@trainer2.visible=true
@trainer2.color.alpha=256
for i in 1..16
@trainer1.x+=16
@trainer2.x-=16
light_move
pbWait(1)
end
20.times do
light_move
pbWait(2)
end
for i in 1..16
@trainer1.color.alpha-=16
@trainer2.color.alpha-=16
@shadow1.opacity+=16
@shadow2.opacity+=16
light_move
pbWait(1)
end
60.times do
light_move
pbWait(2)
end
for i in 1..10
@VS.zoom_x=i
@VS.zoom_y=i
@VS.x=256-75*i
@VS.y=225-75*i
light_move
pbWait(1)
end
pbWait(2)
@VS.dispose
@left.dispose
@right.dispose
@trainer1.dispose
@trainer2.dispose
@light1.dispose
@light2.dispose
@light3.dispose
@light4.dispose
@border.dispose
@shadow1.dispose
@shadow2.dispose
$vsBar=[false,nil,nil]
end
end
end
def light_move
@light1.x+=10
@light2.x+=10
@light3.x-=10
@light4.x-=10
@light3.x = @light4.x+580 if @light4.x<=10
@light4.x = @light3.x+580 if @light3.x<=10
@light1.x= @light2.x if @light2.x>=509
@light2.x= @light1.x if @light1.x>=509
end