90 lines
2.3 KiB
HTML
90 lines
2.3 KiB
HTML
<html>
|
|
<head>
|
|
<title>Blitz3D Docs</title>
|
|
<link rel=stylesheet href=../css/commands.css type=text/css>
|
|
</head>
|
|
<body>
|
|
<h1>After custom_type_variable</h1>
|
|
<h1>Parameters</h1>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
custom_type_variable = not the Type name, but the custom Type name
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h1>Description</h1>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
If you haven't read up on the TYPE command, you might want to do so before continuing.
|
|
|
|
<br />
|
|
|
|
<br />
|
|
Use this to assign a custom Type object to the next object in the collection. See the example.
|
|
<br>
|
|
<br>
|
|
See also: <a class=small href=Type.htm>Type</a>, <a class=small href=New.htm>New</a>, <a class=small href=Before.htm>Before</a>, <a class=small href=First.htm>First</a>, <a class=small href=Last.htm>Last</a>, <a class=small href=Each.htm>Each</a>, <a class=small href=Insert.htm>Insert</a>, <a class=small href=Delete.htm>Delete</a>.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h1><a href=../2d_examples/After.bb>Example</a></h1>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
; Define a crafts Type
|
|
<br />
|
|
|
|
<br />
|
|
Type crafts
|
|
<br />
|
|
Field x
|
|
<br />
|
|
Field y
|
|
<br />
|
|
Field dead
|
|
<br />
|
|
Field graphic
|
|
<br />
|
|
End Type
|
|
<br />
|
|
|
|
<br />
|
|
; Create 100 crafts, with the unique name of alien
|
|
<br />
|
|
For t = 1 To 100
|
|
<br />
|
|
alien.crafts = New crafts
|
|
<br />
|
|
alien\x = Rnd(0,640)
|
|
<br />
|
|
alien\y = Rnd(0,480)
|
|
<br />
|
|
alien\dead = 0
|
|
<br />
|
|
alien\graphic = 1
|
|
<br />
|
|
Next
|
|
<br />
|
|
|
|
<br />
|
|
; Move to the first object
|
|
<br />
|
|
alien.crafts = First crafts
|
|
<br />
|
|
|
|
<br />
|
|
Print alien\x
|
|
<br />
|
|
Print alien\y
|
|
<br />
|
|
Print alien\dead
|
|
<br />
|
|
Print alien\graphic
|
|
<br />
|
|
|
|
<br />
|
|
; move to the next alien object
|
|
<br />
|
|
alien = After alien
|
|
<br />
|
|
|
|
<br />
|
|
Print alien\x
|
|
<br />
|
|
Print alien\y
|
|
<br />
|
|
Print alien\dead
|
|
<br />
|
|
Print alien\graphic
|
|
<br />
|
|
|
|
<br />
|
|
; move to the last alien object
|
|
<br />
|
|
alien.crafts = Last crafts
|
|
<br />
|
|
|
|
<br />
|
|
Print alien\x
|
|
<br />
|
|
Print alien\y
|
|
<br />
|
|
Print alien\dead
|
|
<br />
|
|
Print alien\graphic
|
|
<br />
|
|
|
|
<br />
|
|
; move to the second to the last alien object
|
|
<br />
|
|
alien = Before alien
|
|
<br />
|
|
|
|
<br />
|
|
Print alien\x
|
|
<br />
|
|
Print alien\y
|
|
<br />
|
|
Print alien\dead
|
|
<br />
|
|
Print alien\graphic
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<a target=_top href=../index.htm>Index</a><br>
|
|
<br>
|
|
Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=After&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
|
|
</html>
|