Visual Basic Express 2010 Tutorial 41 Dynamically Adding Invaders - EZInvaders Part 10 Game

preview_player
Показать описание
Copy and pasting objects in the form manually does works for small sets of objects. If the application needs 100s of objects then copy and pasting will not work well. What is needed is to dynamically add objects to the form. Make a variable as the object you want to create. Make a new instance of that object, set the properties, then add the object to the controls by using Controls.Add
Рекомендации по теме
Комментарии
Автор

@TodayRunescape Is Invaders in your Resources? And is it written down without any spelling mistakes?

janekvanwolfswinkel
Автор

Thank you. Now I can make a laberinth game with movin objects. Thank you so much. :)

igrimy
Автор

ugh... on the
Private Sub LoadInvaders()
For Me.x = 1 to NumOfInvaders
Invaders(x) = New PictureBox
etc.
it gives me an error when i try to run, it tells me that the index is outside the bounds of the array and highlights the Invaders(x) = New PictureBox
any help?

drivr
Автор

WHY DID YOU MAKE ME MAKE ALL THEM THEN DELET. IHML IT TOOK ME HOURS TO FIX IT, IM SO TIRED>

kk rage aside i love your tuts.

xJackeeboix
Автор

'a' is a type in 'Resources' and cannot be used as an expression.
any help guys?

billywongso
Автор

you should make the it pause a second or 2 before making another invader :D
i wud appreciate if u do make a tutorial on that :D

AwesomeAnimatorMan
Автор

You didn't show us the part where you changed your hit detection system to include an infinite number of invaders! Shame on you! Dx

thespicehoarder
Автор

I'm not sure what I'm doing wrong. From what I can see It was the exact same. But when I run The invaders start 50 pixels dropped. And when they hit the other side they drop another 50 and all is going well till they get back to the original side. Then they go up 50 pixels and start in a loop. If I change the invader drop to 100, they start 100 pixels down, and drop 100, then go back up 100. Does anyone else have this problem?!?

zxcvbnmjfjf
Автор

omg it says My.Resources.Invader is not member of ezinvaderresources

_-_-_-_-_-_-_-
Автор

mine dosent have the png as a reasorce

Thehalopianoplayer
Автор

@kallejjk well try this "My.Resources.Invader.png" i'm not doing this but it should work with the extansion

zeyph
Автор

@robinp7720 Thanks for responding but already got it whats wrong

_-_-_-_-_-_-_-
Автор

game works great except some lag but that is to be expected

taylorbrown
welcome to shbcf.ru