<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Help?</title>
		<link>http://gamedesign.wikidot.com/forum/t-20520/help</link>
		<description>Posts in the discussion thread &quot;Help?&quot;</description>
				<copyright></copyright>
		<lastBuildDate>Wed, 09 Sep 2026 19:08:25 +0000</lastBuildDate>
		
					<item>
				<guid>http://gamedesign.wikidot.com/forum/t-20520#post-51558</guid>
				<title>Re: Help?</title>
				<link>http://gamedesign.wikidot.com/forum/t-20520/help#post-51558</link>
				<description></description>
				<pubDate>Mon, 24 Sep 2007 07:05:14 +0000</pubDate>
				<wikidot:authorName>BloodyRain</wikidot:authorName>				<wikidot:authorUserId>37358</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>i forgot to log in xD thanks again</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikidot.com/forum/t-20520#post-51557</guid>
				<title>Re: Help?</title>
				<link>http://gamedesign.wikidot.com/forum/t-20520/help#post-51557</link>
				<description></description>
				<pubDate>Mon, 24 Sep 2007 07:04:06 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>thanks</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikidot.com/forum/t-20520#post-51506</guid>
				<title>Re: Help?</title>
				<link>http://gamedesign.wikidot.com/forum/t-20520/help#post-51506</link>
				<description></description>
				<pubDate>Sun, 23 Sep 2007 22:50:05 +0000</pubDate>
				<wikidot:authorName>u9</wikidot:authorName>				<wikidot:authorUserId>12755</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hey BloodRain,</p> <p>Here's what's wrong with your code. You create a single <tt>zombie</tt> and an array of <tt>zombies</tt>. This in itself is nothing bad, but you seem to mix the two. First, you load the image into the <tt>zombie.image</tt> (line 12) but in your <tt>rise_from_the_dead</tt> method you try and clone an image in the <tt>zombie_image</tt> variable (line 22). This variable doesn't exist. Furthermore you assign the cloned image (which failed) to the <tt>zombie.image</tt> property instead of the image property of the current zombie (also line 22). Look at the difference between my version and yours, and you will probably see what you did wrong.</p> <p>Your next problem was actually that you don't draw the zombies. You have to draw the zombies in every frame if you want to see them, so i moved the for-loop that draws them into the main loop between <tt><a href="http://gamedesign.wikidot.com/brutus2d:graphics-clear">Graphics.Clear</a></tt> and <tt><a href="http://gamedesign.wikidot.com/brutus2d:graphics-display">Graphics.Display</a></tt>.</p> <p>To make sure you see all zombies, and so they are not just drawn on top of each other, i randomized the start coordinates in the <tt>rise_from_the_dead</tt> method.</p> <p>Hope this helps. Let me know if you are having any more trouble or if there is something you didn't understand :)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikidot.com/forum/t-20520#post-51341</guid>
				<title>Re: Help?</title>
				<link>http://gamedesign.wikidot.com/forum/t-20520/help#post-51341</link>
				<description></description>
				<pubDate>Sun, 23 Sep 2007 05:01:01 +0000</pubDate>
				<wikidot:authorName>hartnell</wikidot:authorName>				<wikidot:authorUserId>10978</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>What error / problems are you having with it ? &#8212;hartnell</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikidot.com/forum/t-20520#post-51289</guid>
				<title>Re: Help?</title>
				<link>http://gamedesign.wikidot.com/forum/t-20520/help#post-51289</link>
				<description></description>
				<pubDate>Sat, 22 Sep 2007 22:10:10 +0000</pubDate>
				<wikidot:authorName>u9</wikidot:authorName>				<wikidot:authorUserId>12755</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <div class="code"> <pre><code>graphics.Initialize key.Initialize Dim zombie_image Dim zombies(100) ' The original zombie image (that all the images will clone from) zombie_image = graphics.LoadImage(&quot;C:\Documents and Settings\BloodyRain\My Documents\My Pictures\zombie.PNG&quot;) Class zombie_cl Public hit_points Public x Public y Public image Public Sub rise_from_the_dead() hit_points = 10 x = rnd() * 800 y = rnd() * 600 image = graphics.CloneImage(zombie_image) End Sub Public Sub move_x( move_it ) x = x + move_it If x &gt; 800 Then x = 600 If x &lt; 0 Then x = 0 End Sub Public Sub move_y( move_it ) y = y + move_it If y &gt; 600 Then y = 600 If y &lt; 0 Then y = 0 End Sub Public Sub draw() graphics.SetXY image, x, y graphics.SetImage image End Sub End Class For i = 1 To 100 Set zombies(i) = New zombie_cl zombies(i).rise_from_the_dead() Next Do graphics.Clear For i = 1 To 100 zombies(i).draw() Next graphics.Display Loop Until key.Pressed(vk_escape) Or key.Pressed(vk_windowx) graphics.Terminate key.Terminate</code></pre></div> <p>Here's a working example. I'm sorry i don't have time to explain your faults right now. I'll get back to you tomorrow.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikidot.com/forum/t-20520#post-51285</guid>
				<title>Re: Help?</title>
				<link>http://gamedesign.wikidot.com/forum/t-20520/help#post-51285</link>
				<description></description>
				<pubDate>Sat, 22 Sep 2007 21:44:46 +0000</pubDate>
				<wikidot:authorName>bmatthew1</wikidot:authorName>				<wikidot:authorUserId>11779</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hmmm, I wish I could help you but I don't do much OOP in Brutus2D. :(</p> <p>Perhaps the tutorial could be improved by placing a link to the complete project and graphic files which people could then download.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikidot.com/forum/t-20520#post-51211</guid>
				<title>Help?</title>
				<link>http://gamedesign.wikidot.com/forum/t-20520/help#post-51211</link>
				<description></description>
				<pubDate>Sat, 22 Sep 2007 15:28:29 +0000</pubDate>
				<wikidot:authorName>BloodyRain</wikidot:authorName>				<wikidot:authorUserId>37358</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>im trying to do this zombi thing and like im a NOOB huge noob so what am i doing wrong here?</p> <div class="code"> <pre><code>graphics.Initialize key.Initialize Dim image Dim zombie Dim zombies(100) Set zombie = New zombie_cl zombie.hit_points = 10 zombie.x = 100 zombie.y = 100 zombie.image = graphics.LoadImage(&quot;C:\Documents and Settings\BloodyRain\My Documents\My Pictures\zombie.PNG&quot;) Class zombie_cl Public hit_points Public x Public y Public image Public Sub rise_from_the_dead() hit_points = 10 x = 100 y = 100 zombie.image = graphics.CloneImage(zombie_image) End Sub Public Sub move_x( move_it ) x = x + move_it if x &gt; 800 then x = 600 if x &lt; 0 then x = 0 End Sub Public Sub move_y( move_it ) y = y + move_it if y &gt; 600 then y = 600 if y &lt; 0 then y = 0 End Sub Public Sub draw() graphics.SetX image, x graphics.SetY image, y graphics.SetImage image End Sub End Class For i = 1 to 100 Set zombies(i) = New zombie_cl zombies(i).rise_from_the_dead() Next For i = 1 to 100 zombies(i).draw() Next zombies(1).x = zombies(1).x + 2 if zombies(1).x &gt; 800 then zombie(1).x = 800 Do graphics.Clear graphics.SetImage image graphics.Display Loop Until key.Pressed(vk_escape) Or key.Pressed(vk_windowx) graphics.Terminate key.Terminate</code></pre></div> <p>if someone can just post how its spose to look i can read over what u did and i didnt see what i did wrong im trying to do the zombie tutorial <a href="http://gamedesign.wikidot.com/brutus2d:basic-oop-tutorial-i">http://gamedesign.wikidot.com/brutus2d:basic-oop-tutorial-i</a></p> <p>*edit* - added code box &#8212; hartnell</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>