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 / Player switch? help please.

Author
Message
2 HANDS
16
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: outer-heaven
Posted: 14th Oct 2008 07:41
Ok so i was wondering if anyone had an example of how you would switch between characters like in ghost recon or any other squad based game. Like you could switch through your npc squad team members and play as one of them, its a feature i have wanted for my game from day one.

Please and thank you for your help.
Attila
FPSC Reloaded TGC Backer
20
Years of Service
User Offline
Joined: 17th Aug 2004
Location:
Posted: 14th Oct 2008 19:47 Edited at: 14th Oct 2008 20:05
This code shows an example how to use the same function (Move_Object()) for different objects (the red ball and the yellow block). You can switch the moving object with a mouseclick. Your function to move a object will probably be more complicated.

2 HANDS
16
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: outer-heaven
Posted: 14th Oct 2008 20:04
thank you, this should help.
Captain IceT
16
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Boat Murdered, and Im still laughing!
Posted: 28th Oct 2008 08:43 Edited at: 28th Oct 2008 08:46
Also, if you want to do squad mates like in Ghost Recon, check out user-created Types.



This will really simplify having several people with similar but different aspects. After that, you just have to assign an array:



And then you switch which player in your array you are controlling.

"Dwarf Fortress has taught me that all the world's problems would be substantially reduced had our parent civilizations never minted more than four stacks of coins."
- DwarfFortressWiki

Login to post a reply

Server time is: 2024-11-25 16:33:35
Your offset time is: 2024-11-25 16:33:35