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 / collision enemies with static object (FPSC level)

Author
Message
technotdc
13
Years of Service
User Offline
Joined: 13th Apr 2011
Location:
Posted: 28th Aug 2011 03:25 Edited at: 28th Aug 2011 03:33
Hi...

I need help ,please,to make collision of a enemy with level
(created in FPSC)

code of load level

gdividetexturesize=0 : universefile$="levelbank\testlevel\universe.dbo"
set dir "Files" : load static objects universefile$,gdividetexturesize



code of collision camera/level


if static volume(cox#,coy#-10,coz#,cmx#,cmy#-10,cmz#,1.0)=1
materialtype=get static collision value()
cmx#=cox#+get static collision x()
cmy#=coy#+get static collision y()
cmz#=coz#+get static collision z()
grav#=0.3
else
inc grav#,0.3
endif


code of enemy
load object "media/zombie1/zomes.x",5
position object 5,55,10,-100
loop object 5,1,42
move object 5,1



in loop :zombie1()


function zombie1()
point object 5, position x(),camera position y(),camera position z()
move object 5,1
endfunction



thanks ¡¡¡
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 28th Aug 2011 06:06
Hi there. What about making way points for your enemy ?. You want your enemy walk all around the map looking for you ?

Cheers.

I'm not a grumpy grandpa
technotdc
13
Years of Service
User Offline
Joined: 13th Apr 2011
Location:
Posted: 28th Aug 2011 14:48
bffffff.......

yes....But I don't know to do waypoints (i`m very noob)...my basic is very basic..hehe

¿how can create waypoints ?????

Thanks chafari
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 28th Aug 2011 21:28 Edited at: 28th Aug 2011 23:12
Ok. Now I´m out with my smart phone, when I go back home I,ll show you an example.

Edited
Here is the example, however, you will have to define the behavior of the enemy in all situation. In this example, if we get close to the enemy, we'll be attacked by enemy.







Cheers.

I'm not a grumpy grandpa

Login to post a reply

Server time is: 2024-11-22 17:01:39
Your offset time is: 2024-11-22 17:01:39