Jump to content
Sign in to follow this  
MiG2003

Mad Cow strike simulation

Recommended Posts

I'm almost finnishing my animals pack for Farmland Mod and i want to simulate a Mad Cow attack by calling a script from the config cpp. I've tryed to create a script but i'm having problems cause i'm not good with scripting stuff, so i need some help. I want that the cow attack every person that get close about 50 mts not only the player as it might look by the sample. With this script the cow don't even attack player and if i remove player the cow commits suicide:D If anyone improve to work fine it i'll give credit in the readme file.

Here is the sample code i'm trying to use.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_z = _this select 0

goto "badcow"

#badcow

? player distance _z < 50: _z say "cow"

_z dowatch player;

_z DoFollow player;

_z playmove "headstroke";

_z say "cowstrike";

? player distance _z < 2: _z setdammage player 1;

goto "badcow"

exit

Share this post


Link to post
Share on other sites

I am far away to be a script expert , but i think that using dofollow is not the best thing to do to have the mad cow go to the player position

You should use something like

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">madcow move getpos player

On a trigger that kind of codes work very well to have something namde madcow to move to the exact position of somethng named player.

So using the good script "syntax" to translate the code sample up there should help your script a lot to have the mad cow to move to player position, with a loop the cow will try to move to the player forever or until killed.

Share this post


Link to post
Share on other sites

eeer, u might take a look @ the SST mod, unpbo their bugs (those alien things, not the bugs in a program tounge_o.gif ) and take a look @ their scripts....., altough u need a trigger to get it to work (very easy trigger, even I can do it tounge_o.gif ) and i guess they want some credit for it.... rock.gif

Share this post


Link to post
Share on other sites
shoudl be

madcow domove getpos player

aside

TORO TORO TORO!!!

In the case of a single unit , move and domove are doing the same job.

Share this post


Link to post
Share on other sites
Quote[/b] ]eeer, u might take a look @ the SST mod, unpbo their bugs (those alien things, not the bugs in a program ) and take a look @ their scripts....., altough u need a trigger to get it to work (very easy trigger, even I can do it ) and i guess they want some credit for it....

I'm not sure but i think they have used something similar tozombi script and i want something more simples:) .

Quote[/b] ]You should use something like

Code Sample

madcow move getpos player

On a trigger that kind of codes work very well to have something namde madcow to move to the exact position of somethng named player.

I'll try this tounge_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]eeer, u might take a look @ the SST mod, unpbo their bugs (those alien things, not the bugs in a program   ) and take a look @ their scripts....., altough u need a trigger to get it to work (very easy trigger, even I can do it   ) and i guess they want some credit for it....  

I'm not sure but i think they have used something similar tozombi script and i want something more simples:) .

Quote[/b] ]You should use something like

Code Sample  

madcow move getpos player

On a trigger that kind of codes work very well to have something namde madcow to move to the exact position of somethng named player.

I'll try this  tounge_o.gif

meh, the SSTscript is a simplified version of the zombie script, but AFAIK there is no other way, cuz ull always need to specify (just trew a dificult word in (aarh, spelling sucks) tounge_o.gif ) their targets, the with the sst mod the only thing u had to type was SST_Bugs

then it worked..., but with the zombies.... erh...  crazy_o.gif

ah well, creating 1 urslef is harder  tounge_o.gif

Share this post


Link to post
Share on other sites

As i say i don't know much about scripting so i think that was easy to simulate a strike from a cow biggrin_o.gif I'll check that STT script anyway, thanks ofpforum  wink_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]eeer, u might take a look @ the SST mod, unpbo their bugs (those alien things, not the bugs in a program   ) and take a look @ their scripts....., altough u need a trigger to get it to work (very easy trigger, even I can do it   ) and i guess they want some credit for it....  

I'm not sure but i think they have used something similar tozombi script and i want something more simples:) .

Quote[/b] ]You should use something like

Code Sample  

madcow move getpos player

On a trigger that kind of codes work very well to have something namde madcow to move to the exact position of somethng named player.

I'll try this  tounge_o.gif

meh, the SSTscript is a simplified version of the zombie script, but AFAIK there is no other way, cuz ull always need to specify (just trew a dificult word in (aarh, spelling sucks) tounge_o.gif ) their targets, the with the sst mod the only thing u had to type was SST_Bugs

then it worked..., but with the zombies.... erh...  crazy_o.gif

ah well, creating 1 urslef is harder  tounge_o.gif

I don't think the zombie code can get any easier to program!!

Bah rock.gif

biggrin_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]eeer, u might take a look @ the SST mod, unpbo their bugs (those alien things, not the bugs in a program   ) and take a look @ their scripts....., altough u need a trigger to get it to work (very easy trigger, even I can do it   ) and i guess they want some credit for it....  

I'm not sure but i think they have used something similar tozombi script and i want something more simples:) .

Quote[/b] ]You should use something like

Code Sample  

madcow move getpos player

On a trigger that kind of codes work very well to have something namde madcow to move to the exact position of somethng named player.

I'll try this  tounge_o.gif

meh, the SSTscript is a simplified version of the zombie script, but AFAIK there is no other way, cuz ull always need to specify (just trew a dificult word in (aarh, spelling sucks) tounge_o.gif ) their targets, the with the sst mod the only thing u had to type was SST_Bugs

then it worked..., but with the zombies.... erh...  crazy_o.gif

ah well, creating 1 urslef is harder  tounge_o.gif

I don't think the zombie code can get any easier to program!!

Bah  rock.gif

biggrin_o.gif

lol, dont understand me wrong, its one of the best scripts ever made, and i implented then into several units (yea, of course i didnt release it... tounge_o.gif ), but for lazy people like me its a hell to get it to work... (yea, i know how it works, im just lazy as hell), the SST script (based on urs) is abit shortened, but missed some things...

ah well, the game logic thing works perfectly, but i still dont wanna do the glbtargets thingy tounge_o.gifwink_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ] i still dont wanna do the glbtargets thingy

How hard can it be to create one little array? All you need is just a teeny bit of editing knowledge, which one would assume that you have if you are trying to make a mission. rock.gif

Share this post


Link to post
Share on other sites
Quote[/b] ] i still dont wanna do the glbtargets thingy

How hard can it be to create one little array? All you need is just a teeny bit of editing knowledge, which one would assume that you have if you are trying to make a mission.  rock.gif

as i said, i CAN do it, but im too lazy....

mostly bcuz i make quik "destroy all 600 zombies" missions, were i just place some random units against ALOT zombies  wink_o.gif

EDIT: anyways this is gettin way offtopic wink_o.gif

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  

×