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

Music won't stop (+ help with teammates)

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

Junior Member
Junior Member


Joined: 20 Sep 2014
Posts: 31
Location: Lublin, Poland
536 Bank Notes
Items

PostPosted: Tue Jan 23, 2018 10:58 pm    Post subject: Music won't stop (+ help with teammates) Reply with quote

Hello everyone, the mission I'm working at is a bit complicated, so please bear with me during my explanations.
But first the issue in general - the music stream I (successfully) made to be stopped in a script starts playing itself after loading a save. How to stop it?

So, the script structure of the missions looks like that:
after the spawn you go to talk to Vincenzo (whose script is always active, that is - it doesn't get at any point act_setstate inactive. All the other scripts mentioned are first inactive and have to be turned on by some other actor).
Talking to Vincenzo (with event use_ab command) sets off, among others, another actor called vinwlacza, which turns on actor music1.

(As I said, it's a bit complicated, but I found it much easier to work like that in this mission. Usually I do many more things in each script, limiting their numbers).

Ok, so music1 looks like that:

Code:
act_setstate -1,inactive

dim_act 50
dim_frm 50
dim_flt 50

findactor 0,"Tommy"
findactor 1,"music2"

stream_create 0,"sounds\music\chinatown.ogg"
STREAM_PLAY 0
STREAM_SETLOOP 0,1

label 1
wait 10000
goto 1

event 1
STREAM_STOP 0
act_setstate 1,active
return


This event 1 is started by talking to Vincenzo2 later on in the mission.
Just so you know, the actors you talk to later are (chronologically):
Frank, Frank2, Morello, Morello2, Bruno.
Autosaves come after Frank, Morello and Bruno.
Frank2 is supposed to send event1 to music2, which stops its stream and starts music3.
Morello2 sends event1 to music3, which stops its stream and starts music4.

It all works - the streams stop playing and the new ones kick in.
The problem starts in loading any of the autosaves - suddenly all of the streams that were played up to this point in the game start playing immediately.

I can add that before you talk to Vincenzo, from the start of the game, another stream is played, that is stopped after talking to Vincenzo. And it never comes back again after loading the game.

Does anyone know what can be the reason of all of that? Or better yet - how to solve it? Smile

------

Second thing is not so important - I created a bunch of actors who are supposed to follow you. Their behaviour is set to "no reaction" and agression is 0,5.
There is a number of civilians on the map, mixed with your enemies.
The enemies have "react on attack" and agression 1. One of the enemies has "react to player" and 1. As all the enemies are in one group, attacking him (or rather defending yourself from him) will cause the enemies to react on your attack. That starts another script which gives the enemies guns and your buddies guns.
It's done so your buddies don't run around with the guns in the first place (and don't cause the enemies immediately to attack them) and for the buddies not to go on a rampage as soon as they see any person other than me.
However, that has a drawback - I attack the enemies, everyone gets guns, but my buddies are rather weak in reacting. They only shoot back if they get hit and only to the enemies rather nearby. They won't shoot other enemies from afar and won't shoot the civilians.

Is there any way to improve their behaviour when the action starts? It would be perfect to change their agression to 1... Can it be done somehow?

Thank you for any help!
Back to top
View user's profile Send private message
Muggy

Site Staff
Site Staff


Joined: 05 Jan 2005
Posts: 859
Location: Sydenham SE26
276948 Bank Notes
Items

PostPosted: Tue Jan 23, 2018 11:49 pm    Post subject: Music won't stop (+ help with teammates) Reply with quote

I have moved this to Ask a Modder - Modding, Mafia Mod Help is for help with installing/running or any other problems with existing mods already released. Wink
_________________

Back to top
View user's profile Send private message Visit poster's website
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.014 | Queries: 18