Jump to content
Sign in to follow this  
D.murphy man

Need some scripts for my mission

Recommended Posts

heres the things i need:

1.how do u make respawn

2.i want to some how make it so when u kill the other player u ern money and with this u can buy guns and mayby cars.

Btw im not very good at scripting and my mission is going to played over LAN if it makes any differce.

thx in advance

Share this post


Link to post
Share on other sites

Damn had to retype.

For respawn put these lines in your description.ext:</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">respawn = 3;

respawndelay=7;<span id='postcolor'>

Then on your map create 2 markers and call them Respawn_West and Respawn_East.

That's where they'll respawn.

It's not so easy to tell who you killed, but maybe the rating functionality can be used to see if you smoked a unit, thus giving you money. I see you want to get a Counterstrike thing going.

Share this post


Link to post
Share on other sites
Guest

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (D.murphy man @ Aug. 20 2002,20:47)</td></tr><tr><td id="QUOTE">moving to ME? do u mean moving to mission editing coz it was all ready on it.<span id='postcolor'>

ME = Mission Editing. You posted it in Addons & Mods smile.gif

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (denoir @ Aug. 20 2002,14:47)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (D.murphy man @ Aug. 20 2002,20:47)</td></tr><tr><td id="QUOTE">moving to ME? do u mean moving to mission editing coz it was all ready on it.<span id='postcolor'>

ME = Mission Editing. You posted it in Addons & Mods smile.gif<span id='postcolor'>

Listen pal (D murphy man), change your Nickname, Murphys Law is killing you. tounge.gif

Share this post


Link to post
Share on other sites

bn880

thx for the respawn but the players r both civs.And my mission is called living everon were u fight inbtween three towns and theres cops that shoot u if u kill any one part from the other player.Its relly fun on lan at the moment but i have to restart all the time sad.gif but not any more thx

edit.

lol this is confuseing were both typing thing at the same time.and im cursed with murphys law ill have to go and chang my seccond name tounge.gif oh and murphy is atully my second name and the D stands for my first if u were woundering

Share this post


Link to post
Share on other sites

the respawn dident work i did test it in single player tho on my self and ai.i think iv cocked up the description.ext what do i call it and what do i need to type it in to coz iv been useing note pad??this is the first time iv tryed scripting out side of the map editor.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (D.murphy man @ Aug. 20 2002,17:23)</td></tr><tr><td id="QUOTE">the respawn dident work i did test it in single player tho on my self and ai.i think iv cocked up the description.ext what do i call it and what do i need to type it in to coz iv been useing note pad??this is the first time iv tryed scripting out side of the map editor.<span id='postcolor'>

Oh you are doing all the right things except; respawning only works in MP.

I have played around with respawning in SP, but I have not created a "usable" version of it.

Notepad is good. Ultra Edit is a nicer tool, just my preference.

Share this post


Link to post
Share on other sites

I'm fairly certain that respawn does not work in single player at all.

And try respawn_civ as your marker. (if the players are civilians)

As for the money, you'd have to probably watch player scores using the score command.

as in, have a script on the server only (gamelogic time, babay!wink.gif that loops with a small delay and watch for changes in the score of players. score goes up = more money.

I've never done this, and I'm talking out of my ass. So be forewarned. Bn880 is the man.

Share this post


Link to post
Share on other sites

b880 will u give us the secret to making money(And dont say get a job tounge.gif )

Edit.

if i but respawn_civ thatll mean that all the A.I iv killed will respawn too what about if a name one player man1 and the other man2(its a 2 player map)and put respawn_man1..ect,ect wil that work?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (D.murphy man @ Aug. 20 2002,17:35)</td></tr><tr><td id="QUOTE">b880 will u give us the secret to making money(And dont say get a job tounge.gif )

Edit.

if i but respawn_civ thatll mean that all the A.I iv killed will respawn too what about if a name one player man1 and the other man2(its a 2 player map)and put respawn_man1..ect,ect wil that work?<span id='postcolor'>

Work for Microsoft? smile.gif

Well, the AI that would normally be playable will respawn, but not just regular AI.

No i don't think OFP engine has support for Respawn_xxxx markers, let me see:

respawn_east

respawn_west

respawn_guerrila

respawn_civilian

respawn_

Hmm, do not know what respawn_ does, maybe there is some additional support but I don't know.

Hey, by changing the number in respawn= 3 you can make the players respawn in their old positions

only problem is if they die in water, they respawn in water.

Share this post


Link to post
Share on other sites

I'm being especially generous today, probably because I'm bored way out of my mind.  So here's a script that is completely untested that you can try.

don't forget to make a game logic called "server" and name both players player1 and player2

; dismas, oh yeah!

; Assuming that the score command increments:

; 1 for ai kill

; 2 for soft vehicle kill

; 3 for hard/armoured vehicle kill

; 5 for airplane kill

; and assuming that there are only 2 players.  PERIOD.

? !(local server) : exit

; amount of money per point

_moneyModifier = 100

player1money = 0

player2money = 0

player1score = 0

player2score = 0

_diff = 0

_ns = 0

#loop1

_ns = score player1

? (player1score == _ns) : goto "next1"

_diff = player1score - (_ns)

? _diff > 0 : player1money = player1money + (_moneyModifier * _diff)

player1score = _ns

publicVariable "player1money"

#next1

_ns = score player2

? (player2score == _ns) : goto "next2"

_diff = player2score - (_ns)

? _diff > 0 : player2money = player2money + (_moneyModifier * _diff)

player2score = _ns

publicVariable "player2money"

#next2

~1

goto "loop1"

exit

edit:

as usual, I made a small mistake (which was somewhat critical).  script should work fairly nicely now.

edit #2:

I hate me for this.  Small change to make it more reliable in MP.

edit #3:

and another critical mistake fixed. smile.gif

I'm on fire today.

Share this post


Link to post
Share on other sites

ok i have 2 proplems

1.i am a member of ofpec but its sayin ur user name does not exis.

2.i have know idea what dismas is saying (u lost me at ; dismas, oh yeah!)remember i cant script at all,just about i only know basic things but thx any way.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×