Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Ever
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Germany
Posted: 22nd Nov 2002 20:08
Can someone tell me,please, what types are, how to use them,and make some examples?
someone wrote in another topic that he is happy because its much easier now to handle enemies.why? thanks in advance.
Ever heard about the "DARK LOOP"? Well,it is in every windows based computer,it spyes you,it follows everything you do: YOU CAN DO NOTHING,TO ESCAPE THIS DAMN LOOP!!hehe,sorry Bill(j/k)
DrakeX
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 22nd Nov 2002 22:35
well in english (or anglais )

you make the "definition" of a type like so:

type player
x#, y#, z#
health
magic
endtype

or something like that. that's just the definition of a player tho; now to make some.

player1 as player

now you've made a player called player1. let's set some stuff.

player1.x#=10
player1.y#=12
player1.z#=30
player1.health=100
player1.magic=25

ok! to access the variables inside a player you use the period.

you can also make an array of player like so:

dim players(10) as player

then it's pretty much the same:

players(0).health=50
players(7).y#=54.5

it's easy.

you can also put types in types, which is really no more difficult:

type vertex
x,y
endtype
type line
v1 as vertex
v2 as vertex
endtype

longline as line
longline.v1.x=5
longline.v1.y=10
longline.v2.x=200
longline.v2.y=400



i'm looking at yooooou!

Login to post a reply

Server time is: 2024-04-26 01:54:13
Your offset time is: 2024-04-26 01:54:13