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.

FPSC Classic Scripts / destroy entity (monster) when player reach triggerzone

Author
Message
abdullh
12
Years of Service
User Offline
Joined: 30th Aug 2012
Location:
Posted: 1st Oct 2012 19:34 Edited at: 1st Oct 2012 19:36
hi
i know i asked many things and you get mad of me
but you know i like this forum because all of you help us and activity
but please don't get mad who read this
we Proud of you

====================================================
anyway let me ask you my problem
i searched in forum (Destroy)
and i found only this one
http://forum.thegamecreators.com/?m=forum_view&t=199769&b=23
======================================
i tested i know its work ...but this is not what i want....

here what i did >>>

1- i put trigger zone and in main AI (plrinzoneactivateused)
2- I put if used ( entity name ) example : Monster
now it is work the enemy appear ....

=====================================
the main problem is destroy enemy
i put the second trigger zone when player reach to trigger zone ...the monster should disappear
=====================================
i try many script ( folder Destroy ) in scirpt bank
and some script that i found in website

but doesn't work ...can anyone please provide me how to destroy enemy when player reach triggerzone
=====================================
Thanks a lot
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 1st Oct 2012 21:47 Edited at: 1st Oct 2012 21:49
For want of a better option a script could help you.

Try my "Umans Load and Unload Entities on the Fly"

http://forum.thegamecreators.com/?m=forum_view&t=73014&b=23

You may have to edit out the part that reloads entities after destroying them or otherwise edit it to suit your needs.

Hope that helps.
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 1st Oct 2012 22:05 Edited at: 1st Oct 2012 22:17
you just must modify my scripts! Then they should work:

pace this in the entity main script:


and this use as a standalone script in two triggerzone
start-triggerzone:

end-triggerzone:


abdullh
12
Years of Service
User Offline
Joined: 30th Aug 2012
Location:
Posted: 1st Oct 2012 22:50
hi mr. uman

i will try what you give me thanks a lot Thanks man, This is a big help

=====================================
mr. corno_1

please see in attachment this is test what you give me
and you will see it doesn't work ...i see your tutorial

Attachments

Login to view attachments
abdullh
12
Years of Service
User Offline
Joined: 30th Aug 2012
Location:
Posted: 1st Oct 2012 22:58
Wait corno_1 hahaha
you edit your post i didn't see it i'm so sorry

please let me see and try what you told me

i will give you my result
abdullh
12
Years of Service
User Offline
Joined: 30th Aug 2012
Location:
Posted: 1st Oct 2012 23:07
okay i test that you give me your code

first 1 entity.fpi and first triggerzone work fine and his appear

the second trigger zone i put your third code in second trigger zone ..and doesn't work i mean didn't destroy
Fenwolf
13
Years of Service
User Offline
Joined: 24th Oct 2011
Location: United States
Posted: 2nd Oct 2012 09:51
The "Monster" needs to know when to die. I'd solve the problem in the following manner:

First trigger zone to activate entity:


Note that the first trigger zone can be suspended and or destroyed, since it is no longer needed.

Second trigger zone to increment:


Again, the second trigger zone has served its purpose. Suspend or destroy it.

Finally, this line needs to be in the script for the entity that you wish to destroy:


You can play around with the code and trigger zones to assure that the critter/monster is created before it is set to die. The variable, critterdie can be used for this.

There might be a better way, but this is how I would handle it.

Life is about living.
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 2nd Oct 2012 10:39
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 2nd Oct 2012 19:35
so here this is my last try: this is tested by me and it works 100%
scripts and tutorial

Attachments

Login to view attachments
abdullh
12
Years of Service
User Offline
Joined: 30th Aug 2012
Location:
Posted: 2nd Oct 2012 23:05
@ Fenwolf
@Corno_1

i tested with your script it's work

thanks a lot
for helping me thaaaaaaaaaaanks

Login to post a reply

Server time is: 2024-11-23 20:09:49
Your offset time is: 2024-11-23 20:09:49