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 / making an object follow a path and then destroy itself

Author
Message
Lewis
VBOTB Developer '10
19
Years of Service
User Offline
Joined: 16th Mar 2005
Location: Queensland, Australia
Posted: 11th Feb 2006 12:21
i am making a bit in the game where a ship follows a waypoint i put up, and then at the end, destroys itself with a noise. how do i do it?

WHAT I NEED DOING:
*ship follows waypoint
*ship destroys itself at end
*plays explode noise once destroyed.

btw, the ship is the one of the fighter ships in the sci-fi vehicles pack on fps-files.net so is there anything i have to do to make it be able to do this?

Lewis From OsborneCreations.co.uk
Lewis
VBOTB Developer '10
19
Years of Service
User Offline
Joined: 16th Mar 2005
Location: Queensland, Australia
Posted: 13th Feb 2006 23:19
stop viewing and start replying! ive waited for ages! anyone help me!

Lewis From OsborneCreations.co.uk
Disturbing 13
18
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 13th Feb 2006 23:50
I would suggest haveing the object walk through a hurtzone, but from what I hear (and tested)that doesn't work.

JEEZ!You people just STFU! You waste more space complaining about people wasting space than the people your bashing! Man, I thought I had no life.
Lewis
VBOTB Developer '10
19
Years of Service
User Offline
Joined: 16th Mar 2005
Location: Queensland, Australia
Posted: 14th Feb 2006 21:39
er...thanks?

Lewis From OsborneCreations.co.uk
Disturbing 13
18
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 15th Feb 2006 01:23
well you got a reply, just not the one ya wanted.

JEEZ!You people just STFU! You waste more space complaining about people wasting space than the people your bashing! Man, I thought I had no life.
uman
Retired Moderator
19
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 15th Feb 2006 03:01
I use hurt zones successfully where the player is concerned. Not sure if they work where other dynamic enities are concerned though. I guess you would have to apply an enemy script to them and set anywithin to the zone to activate it - dont know if it would work myself as I have not tried it. I am about to shortly on an enemy I want to destroy myself.

The only other way I suppose would be to use the destroy command within a script but thats going to be harder for someone to achieve when relative to a position along a path - again its AI stuff I am working on at the moment and its not easy for me at least but making some good progress.

You could also try spawning the entity and if you can be accurate enough to work out a time period specify a spawn life so it dies after a certain length of time - again something I am testing at the moment.

Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 15th Feb 2006 06:21 Edited at: 15th Feb 2006 06:48
I don't know much about waypoints, because I haven't used them yet.
However, having something happen when an object gets to a certain point is easy.
It's just like my land mine script. (I used it for a cemetary headstone)
When the object gets close to the trigger, then the trigger begins the actions.
You could modify that script and use a blood-splat as the trigger with a trueblack (Transparent) texture.
Have the ship's object's name in the ifused of the blood-splat.
Don't forget to set the blood-splat static mode to no.
Place the blood-splat at the waypoint's marker.
When the ship gets there ..... booom.

Just a thought.
My land mine script is included in my ADD-ON which you can find at my website using the link below.
Of course the script would need to be modified to exclude damage to the player like it is now.
Instead, you would call an activated=X for the ifused object (ship), then it's script would then take action.
Destroying itself would be the only thing for the ship to do.
The sound effects and decal for explosion(s) could be called by the trigger when it activates the ifused.
This would assure the execution of the effects.



Don't forget to visit http://www.conjured.us/

Support Your Local CE-FPSC Chapter
Lewis
VBOTB Developer '10
19
Years of Service
User Offline
Joined: 16th Mar 2005
Location: Queensland, Australia
Posted: 15th Feb 2006 10:51
so your saying i should put your mine in the path of the ship and it will destroy the ship?

i also want a part in a game where you come to a T junction and a monster leaps across, and when you go round the corner, its not there....spooky....
so do i do he same apart from i dont make the BOOM? also conjured, i have to buy the mine? or can you send me it?

WHAT I NEED DOING:
-----------------
3) 2)
----- ------
I I
I I
I I
I * I
I 1) I
I I
_______
1) Player Marker
2)Monser Runs
3)Monster Dissapears
* when player gets to here

Lewis From OsborneCreations.co.uk
Lewis
VBOTB Developer '10
19
Years of Service
User Offline
Joined: 16th Mar 2005
Location: Queensland, Australia
Posted: 15th Feb 2006 10:52
dammit it turned out wrong, im gonna post a pic instead.

Lewis From OsborneCreations.co.uk
Lewis
VBOTB Developer '10
19
Years of Service
User Offline
Joined: 16th Mar 2005
Location: Queensland, Australia
Posted: 15th Feb 2006 10:56
here we go, the marker is in the post before,

Lewis From OsborneCreations.co.uk

Attachments

Login to view attachments
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 15th Feb 2006 17:19 Edited at: 15th Feb 2006 17:31
plrdistwithin=x will start the ship once the player gets to his marker.
That would be in the Ship's AIMAIN.

Then, the waypoint leads the ship to the mine.
Then, the mine blows it up as described above.

The mine uses a anywithinzone or anywithin=x to detect the ship.
(I assume here that only the ship is allowed to reach the mine's location.)

The rest is like I described above.
The ships AIMAIN has that activated state to know when to destroy itself.
The ships NAME is put in the IFUSED of the trigger.

So, you end up with a couple scripts.

Ships AIMAIN
Triggers AIMAIN


That's how to do it.
Sorry, I don't do freebies anymore.
I will tell you how to do, but if I have to write it for you then its gonna cost.
That ADD-ON I mentioned also has my FPI Tutorial in it. (the land mine was an example in the tutorial)
You need to get your feet wet scripting if you are serious about having custom scripts in your games.
The tutorial was written for beginners, so it won't explain everything but it will get you started.

Don't forget to visit http://www.conjured.us/

Support Your Local CE-FPSC Chapter
uman
Retired Moderator
19
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 15th Feb 2006 21:17
I have been having some problems finding the best solution to this very topic (amongst others).

Certainly the ability to explode an object and kill or destroy an entity works well though we need an option to turn off the explosion decal effect and explosion sound which as far as I am aware cant be done at the moment for it seems to be inbuilt into the engine. This would be useful in many, many other situations when you want to kill an enemy but not blow them up inside an explosion.

I have not found either zones or triggers to work well as the or anywithin=(dist) or anywithinzone commands or all the variations of that kind of thing I have tried dont seem to work with enemies and dont cause them damage or death - whereas the same kind of set up in regard to player works fine. Control of damage to enemies seems to be very limited and inflexible there not being enough support inside the engine itself.

Currently I am using a simple player distance or proximity command inside an entities script file to call the destroy function which works perfectly - though specifying the exact distances to destroy the entity takes much trial and error and then its not ideal for every scenario as its a fixed range.

A working specific destroy zone/hurt zone (without any explosion) for entities is really required. I have not been able to get this kind of zone working myself as yet by utilising any default stuff.

Lewis
VBOTB Developer '10
19
Years of Service
User Offline
Joined: 16th Mar 2005
Location: Queensland, Australia
Posted: 24th Feb 2006 11:28
i still need a script that works! all i need is a script to activate an object following a waypoint. i need DIRECT instructions on how to use it as well. anyone?

Lewis From OsborneCreations.co.uk
Lewis
VBOTB Developer '10
19
Years of Service
User Offline
Joined: 16th Mar 2005
Location: Queensland, Australia
Posted: 24th Feb 2006 20:37
*bump*

Lewis From OsborneCreations.co.uk
Lewis
VBOTB Developer '10
19
Years of Service
User Offline
Joined: 16th Mar 2005
Location: Queensland, Australia
Posted: 25th Feb 2006 13:33
*bump again*

Lewis From OsborneCreations.co.uk
uman
Retired Moderator
19
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 25th Feb 2006 22:52
Lewis,

I told you - you can do it by setting the entity to spawn (Spawn at Start = No) and using a trigger zone to activate the entity on player approach. Activation will then start the enity moving along the path.

A little effort and you will get the entity to work as you want it.

Lewis
VBOTB Developer '10
19
Years of Service
User Offline
Joined: 16th Mar 2005
Location: Queensland, Australia
Posted: 26th Feb 2006 19:44
ive tried, but i dont work! it doesnt bloody spawn!! post a picture!

Lewis From OsborneCreations.co.uk
Dangerous Bob
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 2nd Mar 2006 00:58
Simple just right click and set the boats life to how ever many seconds you want it to live and than put a sound area for a exsplotion.

-Wars have never hurt anybody except the people who die.

Login to post a reply

Server time is: 2024-03-28 18:12:08
Your offset time is: 2024-03-28 18:12:08