FAQFAQ    Board RulesBoard Rules    SearchSearch    LotteryLottery    RouletteRoulette    UsergroupsUsergroups
     RegisterRegister  ProfileProfile    Log in to check your private messagesLog in to check your private messages    Shop    Log inLog in 
View posts since last visit View your posts View unanswered posts

Sniper script

 
Post new topic   Reply to topic    Mafiascene.com Forum Index -> Ask a Modder - Modding
View previous topic :: View next topic  
Author Message
SooperK

Junior Member
Junior Member


Joined: 10 Nov 2014
Posts: 29
Location: Jennewa, Airdenor
41 Bank Notes
Items

PostPosted: Sat May 26, 2018 5:15 am    Post subject: Sniper script Reply with quote

I am looking to fill Lost Heaven with snipers, but so far no luck. I went into the freeride extreme mission and copied the script of the snipers there (the mission where you have to kill 3 of them to get the manta prototype), and inserted a model (Kasar.i3d [Salvatore]), but all that happens when I go into the game was Salvatore running towards me from across the street with nothing in his hands. He just wants to fight me. After killing him and searching his corpse, it says nothing found. So I am looking for advice on creating a script where the sniper will stay put, have the weapon drawn, and fire upon seeing me. This is the script I am using now:

dim_act 2
dim_frm 2

findactor 0,"Tommy"
findactor 1,"Protosniper"

findframe 0,"Tommy"
findframe 1,"Protosniper"

human_addweapon 1, 14, 5, 30
human_activateweapon 1, 14

frm_seton 1,0
act_setstate 1,inactive

enemy_vidim 0
enemy_action_fire 0

This is from a police officer in the Rooftops mission. I just wanted to see if Salvatore would at least start shooting at me, but again no luck as he only charges at me with no weapons on him.
Back to top
View user's profile Send private message
T3mas1

Member
Member


Joined: 11 Jul 2015
Posts: 138
Location: Czech Republic
318 Bank Notes
Items

PostPosted: Sat May 26, 2018 7:33 am    Post subject: Sniper script Reply with quote

This is the script that I use. The enemy should stay in one place and always shoot at the player. Though I am not sure if it will wok for snipers, the player may be have to be close to the enemy.

dim_act 2

Findactor 0, "Tommy"
Findactor 1, "Enemy7"

human_setproperty 1, 180, Intelligence
human_setproperty 1, 115, Speed
human_setproperty 1, 180, Aggresivity
human_addweapon 1, 9, 7, 21
wait 1000
label 1
enemy_action_fire 0
goto 1
Back to top
View user's profile Send private message
mammix

Junior Member
Junior Member


Joined: 20 Sep 2014
Posts: 38
Location: Lublin, Poland
1103 Bank Notes
Items

PostPosted: Sat May 26, 2018 10:43 am    Post subject: Sniper script Reply with quote

Maybe try adding
enemy_lockstate fight_guard_stand, 3
into the script. That should keep him in place.
Back to top
View user's profile Send private message
SooperK

Junior Member
Junior Member


Joined: 10 Nov 2014
Posts: 29
Location: Jennewa, Airdenor
41 Bank Notes
Items

PostPosted: Sat May 26, 2018 8:07 pm    Post subject: Sniper script Reply with quote

Hey, thanks for the help. I added the script in over my existing and it worked! I also went back into the one I had got before and deleted these lines:

frm_seton 1,0
act_setstate 1,inactive

and that also worked to serve as a sniper as he actually stayed in place. But now what I'm wondering is this:

human_setproperty 1, 115, Speed

What is the "Speed" for? Not long ago I was playing the Alive Mod and when you tapped the letter "S" on the keyboard, Tommy's feet burst into flames and could run extremely fast. Would I need to do something with Speed to accomplish this?
Back to top
View user's profile Send private message
mammix

Junior Member
Junior Member


Joined: 20 Sep 2014
Posts: 38
Location: Lublin, Poland
1103 Bank Notes
Items

PostPosted: Sun May 27, 2018 10:10 am    Post subject: Sniper script Reply with quote

He runs faster with that, maybe has quicker reactions or sth (shooting, reloading?), that's why it was added.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Mafiascene.com Forum Index -> Ask a Modder - Modding All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

Generation Time: 0.019 | Queries: 19