Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: 1 2 3 [4]
  Print  
Author Topic: Hurtle: the ballistic RTS (physics RTS game)  (Read 63292 times)
Mithrandir
Community Member
*
Posts: 326


« Reply #60 on: May 18, 2010, 05:20:57 AM »

In c# you can do:
int body = int.Parse(tag);

and

String tag = body.ToString();
Logged
nicolas
Community Member
*
Posts: 172


« Reply #61 on: May 18, 2010, 11:57:24 AM »

I use VB6. But my problem is:

-I've got an actor named ActorMesh
-it's got a physics body attached to it named ActorPhysics

So now I must do:

ActorMesh.settag(-->something refering to ActorPhysics<--)
physics.rotate -->something refering to ActorPhysics, from ActorMesh.gettag<--, 1,1,1

I cannot find something that both commands are happy with and that works.
Logged
Mithrandir
Community Member
*
Posts: 326


« Reply #62 on: May 18, 2010, 03:31:23 PM »

Since VB6 does all the type conversion you'll just do what I wrote last time:

When creating body for actor:
Code:
Dim BodyID as Integer
Dim Tag as String
Dim Actor as TVActor

BodyID = Physics.CreateBody(100)
' Do all actor loading and body creation and then:

Tag = BodyID
Actor.SetTag(Tag)

Then when doing mouse picking
Code:
Dim BodyID as Integer
Dim Tag as String
Dim Actor as TVActor

'Get actor from mouse picking
Tag = Actor.GetTag
BodyID = Tag
Phusics.SetBodyRotation(BodyID,0,0,0)
Logged
nicolas
Community Member
*
Posts: 172


« Reply #63 on: May 20, 2010, 04:24:14 AM »

I'll try it. But one thing is that I have arrays. My bodyID is phymCatapult(NrCatapults). So I don't know whether the transition to string and back will go smooth in this case...

I'll just try it and report back. Thanks for your help!
Logged
nicolas
Community Member
*
Posts: 172


« Reply #64 on: May 21, 2010, 04:38:12 AM »

It works!

I hadn't thought of using the integer path to translate between string and long in VB6. Thanks a lot! This feature obviously is of primary importance to the game.

Now I can place an armada of catapults around a tower and fire away.  Cool
Logged
nicolas
Community Member
*
Posts: 172


« Reply #65 on: March 11, 2011, 06:16:27 AM »

Hmmm I run into problems with something that should be very simple.

VB6

I have:

Code:
mymesh.setrotation (0,0,0)

Say that I want to be able to set the rotation of any tvmesh to 0. So I make a separate sub:

Code:
setrotationzero(mymesh1)
setrotationzero(mymesh2)
setrotationzero(mymesh3)

private sub setrotationzero (byref meshtorotate as tvmesh)
    meshtorotate.setrotation (0,0,0)
end sub

However, it doesn't work. I get no error, the program just blocks. If I comment out the calls to this sub, the program works. What am I doing wrong?
Logged
nicolas
Community Member
*
Posts: 172


« Reply #66 on: March 17, 2011, 09:12:51 AM »

I just realized this likely is the same type of problem and hence same solution as the problem in the posts above...
Logged
FlorentinaKosse9
Community Member
*
Posts: 1


« Reply #67 on: July 16, 2011, 03:34:01 AM »

I am new to this. Which environment you use to design such games?
Logged

nicolas
Community Member
*
Posts: 172


« Reply #68 on: August 04, 2011, 03:08:11 AM »

tv3d as engine, obviously. I program in VB6, do textures in paint.net, and modeling in Milkshape.
Logged
Pages: 1 2 3 [4]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks