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.

Code Snippets / CShop entity parser

Author
Message
Sparda
20
Years of Service
User Offline
Joined: 13th Jan 2004
Location: Pacifica
Posted: 2nd May 2004 06:57
My first contribution! Hope it works for everyone. Basically this just converts entity data into useable data in a dbpro program. There's one hitch though. Once you have exported the entity .txt file from CShop you will have to use a text editor (Ex: Notepad) to change all " (double quotes) into ' (single quotes). Thank god for the find/replace button. Anyways, enjoy!!!



In this particular code, I was turning entities into waypoint data for my AI. If anybody wants, I can post a commented version too.

There 10 kinds of people, those who understand binary and those who don't
Sparda
20
Years of Service
User Offline
Joined: 13th Jan 2004
Location: Pacifica
Posted: 3rd May 2004 05:21
Not a single comment? Oh well, it's your loss.

There 10 kinds of people, those who understand binary and those who don't
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 3rd May 2004 10:23
why not make it just change the quotes automatically?

"eureka" - Archimedes
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 3rd May 2004 10:44 Edited at: 3rd May 2004 10:45
You can use chr$(34) to represent a double quote. So you could change
if left$(toParser$,8)="'Type'="
to
if left$(toParser$,8)=chr$(34)"Type"+chr$(34)+"="

Then you wouldn't have to change the file in notepad.
There is a list of ASCII codes in the dbpro help
main menu -> principles -> ASCII chart.

i won't see you in the pit
Sparda
20
Years of Service
User Offline
Joined: 13th Jan 2004
Location: Pacifica
Posted: 5th May 2004 05:56
Ok Winch, that will be the next upgrade

There 10 kinds of people, those who understand binary and those who don't
Supremacy
20
Years of Service
User Offline
Joined: 30th Dec 2003
Location:
Posted: 5th May 2004 17:52
ei konrad, this is great, im not sure how to use it, but could you make a demo, were you make a breakable enity on cshop, and then when you shot at it it breaks ? like glass, or something to rotate doors ? please help me m8 , its really important

I will make urban chaos 2, ive already concepted the story, its my dream, i wont to go to muky foot
Sparda
20
Years of Service
User Offline
Joined: 13th Jan 2004
Location: Pacifica
Posted: 10th May 2004 08:17
Ok, but if you wan't glass to break or doors to open, you'll also need animated models. The door thing is just what this does. By placing an entity where you want the trigger for the door to open, you can take the CShop data and turn it into presto! Dbpro data. Not sure if this can help with breakable glass though. Mustra, do you have CShop? Cause that would probably help you too I'll try to post something soon (sorry for later reply) but we all know how unreliable my posting can be

There 10 kinds of people, those who understand binary and those who don't

Login to post a reply

Server time is: 2024-11-23 21:32:52
Your offset time is: 2024-11-23 21:32:52