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.

Newcomers DBPro Corner / Moving a enemy using a map editor

Author
Message
Camronas
14
Years of Service
User Offline
Joined: 2nd Jul 2010
Location:
Posted: 27th Oct 2010 04:47
Ok so im using this system to make my world,


And so on, im trying to move an enemy using this system

How ever no matter what I do I cant move them. I am sure I need to make an array that can manage them but im not sure how, I have made UDTs before but in this case I am not sure.
Im trying to add as many enemies to the array that there are on the map without hard coding it but also need them to move "mindless patroling is find dont really care" but im just so confused.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Oct 2010 21:35
I don't see any movement code in your posted code. Perhaps you should post some code we can run and play with.

Utility plug-ins (26-JUL-2010)
I'm applying terms of use that require you to wear a red nose and honk a horn whenever you use the Internet
Camronas
14
Years of Service
User Offline
Joined: 2nd Jul 2010
Location:
Posted: 29th Oct 2010 01:03
Woops though I had it in there

this is everything.


but the line im trying to use to make it move is



Sorry about the lack of comments i just never remember to do them untill i need help
Camronas
14
Years of Service
User Offline
Joined: 2nd Jul 2010
Location:
Posted: 31st Oct 2010 23:03
Ok I think I know what I need to do... in theory.

In here when the enemies are being created I need to add them to an array "not sure how". Then in a function to be called in the main loop I use a for loop to go through the array and move my enemies. Does that sound right? And if so how can I make the enemies go into that array without hardcoding them in?
Camronas
14
Years of Service
User Offline
Joined: 2nd Jul 2010
Location:
Posted: 1st Nov 2010 12:31
ok i think I have the basic idea

this is the UDT i made for my enemies



this is in the loop that reads the map, its ment to detect the enemy and add one to the UDT, however it always says that objno is an illegal integer, iv changed it to be a float, a double float but everytime is the same error?

Am I missing somthing here? Also am I on the right track?

Login to post a reply

Server time is: 2024-11-23 07:51:47
Your offset time is: 2024-11-23 07:51:47