C Shop Help?

Blitz3D Forums/Blitz3D Programming/C Shop Help?

LKFX(Posted 2005) [#1]
Hi folks im using CShop 4.1 and everthing is going ok but has any one got or know of some examples how to use the
entities side of things, as i would like to set certain areas within my map that changes the music and trigger off certain actions

Thanks guys


jfk EO-11110(Posted 2005) [#2]
I don't use CShop, but I guess it's using child entities for pivot handles. So you would need to recursively parse all entitynames right after loading ( this may help: http://www.blitzbasic.com/codearcs/codearcs.php?code=1170 )
Maybe you best collect all relevant names in an array or type container, so you'll be able to use them quickly without to use FindChild during the gameplay.

Now let's say you have an event triggering dummy child named
"radiationzone123", you probably already created an array that has all entities with names that that contain "radiationzone" stored in an array, all you need to do is something like:
for i=0 to num_radiationzones-1
 if entitydistance(player,rad_zone(i))<15 then
  print "ouch, where does this sunburn come from all of a sudden?"
 endif
next



LKFX(Posted 2005) [#3]
Thanks gives me something to go on, another problem i have is i just made a light bulb model in 3d max and converted it to a prefab but it comes out all square and naff any ideas?

i tried slim shady loaded my ground floor level and merged in the bulb comes out fine but when my program runs it i get "memory access violation". arhhh


jfk EO-11110(Posted 2005) [#4]
when you get a memory access violation, turn on the debugging mode, most times it will give you a more specific error message.

When you export meshes in 3DSMAX you should weld all Vertices in the Mesh Edit Modifer before exporting, this will make sure Blitz will be able to use smoothing.
By default 3DSMAX is doing this with primitives, but it happens that external tools unweld meshes (eg. LithUnwrap), so you need to Re-weld them manually, eg. in 3DSMax.


LKFX(Posted 2005) [#5]
Right i give it another go, im over impressed with cshop so far lol...


LKFX(Posted 2005) [#6]
ok got it worked out now i think, i build my level roughly with cshop, do all my extra bits (furniture etc..) in max or truespace fire up slim merge in the extras set the lights and job done i hope.

Many thanks JFK


jfk EO-11110(Posted 2005) [#7]
Well, slim shady is not a good choice for triggering entities. It will save the map as a single mesh without children. Although it may be useful to load the static part of a Level as a single static mesh, you maybe want to add interactive entities in a further step with an other tool (a Dropper) as individual Entities. Unfortunately they won't have a lightmap.


Shambler(Posted 2005) [#8]
Regarding your light bulb prefab coming out all square...

CShop uses integers for vertex coordinates so you need to scale up your light bulb in max before importing it into CShop.


LKFX(Posted 2005) [#9]
i will try that shambler, shame maplet isnt updated!


LKFX(Posted 2005) [#10]
Yeah my bulb is a bulb at last lol

I use truespace alot and max is it just worth me doing the whole level and furniture in max or truespace then light mapping it somehow, also CShop 4 on mine has no import function whats going on there lol?


jfk EO-11110(Posted 2005) [#11]

CShop uses integers for vertex coordinates


Now this is pretty weird - Josh again, BIG number only :)


LKFX(Posted 2005) [#12]
is there a plugin to export b3d for truespace 6?