Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Apr 18, 2024 8:04 am
All times are UTC + 0
Trigger or Script editing help
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [34 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
WadeSullivan
Vehicle Drone


Joined: 24 Aug 2017

PostPosted: Tue Nov 03, 2020 1:58 am    Post subject:  Trigger or Script editing help
Subject description: Tiberian Sun
Reply with quote  Mark this post and the followings unread

A little help, im trying to do this situation:

A have 2 bases for the AI, NOD1 and NOD BASE

After i destroy 3 power plants, 1 obelisk of light will supercharge and explode. (in NOD1)

On final sun how can i make this happen?

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Tue Nov 03, 2020 10:51 am    Post subject: Reply with quote  Mark this post and the followings unread

Make 3 new local variables:

Powerplant 1
Powerplant 2
Powerplant 3

and set all to 0 (cleared)

Make 3 separate triggers for each powerplant:

Trigger 1- Powerplant 1 destroyed
event - Building destroyed
Action - Set local variable - Powerplant 1
etc.

Attach these triggers to powerplants, double-click on building and select one of trigger tags.

Now make final trigger for obelisk:
Make new trigger, set type to 1 - AND not repeating

Event: (3 events)
Local variable set
Powerplant 1 is set
Powerplant 2 is set
Powerplant 3 is set

Action:
Apply 100 damage to waypoint
(use enough of these to exceed obelisk health)

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue Nov 03, 2020 4:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just attaching tag to those 3 powerplants should be enough, can avoid individual triggers for powerplants and setting local variables.

Attached object/building destroyed event with Tag set to 1 AND one time should be sufficient.

Back to top
View user's profile Send private message
WadeSullivan
Vehicle Drone


Joined: 24 Aug 2017

PostPosted: Tue Nov 03, 2020 6:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

Im a very noob in that matter XD just trying to do a "simple" momento in the campaing mission.
Ok both awnsers work then? Sorry again to ask but there is a step-by-step to me follow?

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Tue Nov 03, 2020 9:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
Just attaching tag to those 3 powerplants should be enough, can avoid individual triggers for powerplants and setting local variables.

Wouldn't this "overcharge obelisk" just after any powerplant is destroyed?

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Nov 04, 2020 3:13 am    Post subject: Reply with quote  Mark this post and the followings unread

I don't see any difference on the effect if additional triggers and local variables are used or not. The powerplants will be destroyed either simultaneous or one by one. The trigger to explode obelisk will activate only after all 3 of those are destroyed.

@WadeSullivan:

For updated FinalSun, use standalone package (or TSClient) to get the Tag option of 1 AND one time. Then update it further from here.

In your map,
- create a waypoint under the obelisk
- create a trigger for that house with Type 1 - AND one time (if you don't have this option, just enter 1 for Type)
- Event, choose 7 Destroyed by any house
- Action, can destroy the obelisk with whatever method you want, by lightning strike or explosion at etc. on the waypoint under the obelisk
- then on the map, double click on the powerplants and set attached tag to the one just created.

Back to top
View user's profile Send private message
WadeSullivan
Vehicle Drone


Joined: 24 Aug 2017

PostPosted: Wed Nov 04, 2020 3:25 am    Post subject: Reply with quote  Mark this post and the followings unread

Well i tried to do that but XD
And the game crash too, doesnt load:

https://ibb.co/ZJrMWSY

In action i putted: 90 Lightning strike at...
and Parameter = 5 (i think is 5 seconds)

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Nov 04, 2020 4:02 am    Post subject: Reply with quote  Mark this post and the followings unread

Edit: You have to use my latest FinalSun Patch, older ones have wrong entries in FSData.ini file.

Back to top
View user's profile Send private message
WadeSullivan
Vehicle Drone


Joined: 24 Aug 2017

PostPosted: Wed Nov 04, 2020 4:12 am    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
Edit: You have to use my latest FinalSun Patch, older ones have wrong entries in FSData.ini file.


I just did, downloaded the final sun standalone and the patch

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Nov 04, 2020 4:14 am    Post subject: Reply with quote  Mark this post and the followings unread

Parameter for 90 lightning strike is waypoint, select the waypoint that you placed under obelisk.

Back to top
View user's profile Send private message
WadeSullivan
Vehicle Drone


Joined: 24 Aug 2017

PostPosted: Wed Nov 04, 2020 4:35 am    Post subject: Reply with quote  Mark this post and the followings unread

Ok i will tell what i did:

1- created the waypoint under the obelisk (N°57)
2- new trigger Obelisk (house NOD, attached trigger=obelisk)
3- events = 7 Destroyed by any house
4- action = 90 Lightning strike at... (action parameter=waypoint, and parameter value=57)
5- 3 powerplants with attached tag = obelisk
6- obelisk attached tag = none

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Nov 04, 2020 4:50 am    Post subject: Reply with quote  Mark this post and the followings unread

2. is wrong. Should not have any attached trigger. Set Type to 1 - AND one time.

Back to top
View user's profile Send private message
WadeSullivan
Vehicle Drone


Joined: 24 Aug 2017

PostPosted: Wed Nov 04, 2020 4:54 am    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
2. is wrong. Should not have any attached trigger. Set Type to 1 - AND one time.


I changed that and will crash the game when loading  Confused  Confused

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Nov 04, 2020 4:59 am    Post subject: Reply with quote  Mark this post and the followings unread

Should be some other problem. Either share the map (in private message if not public) or open the map in text editor and share the code in sections of action, event, tag, trigger and structures.

Back to top
View user's profile Send private message
WadeSullivan
Vehicle Drone


Joined: 24 Aug 2017

PostPosted: Wed Nov 04, 2020 5:03 am    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Nov 04, 2020 5:09 am    Post subject: Reply with quote  Mark this post and the followings unread

That link is asking for login. Just zip the map and attach it here.

Back to top
View user's profile Send private message
WadeSullivan
Vehicle Drone


Joined: 24 Aug 2017

PostPosted: Wed Nov 04, 2020 5:10 am    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
That link is asking for login. Just zip the map and attach it here.



gdi7a.rar
 Description:

Download
 Filename:  gdi7a.rar
 Filesize:  92.46 KB
 Downloaded:  11 Time(s)


Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Nov 04, 2020 5:23 am    Post subject: Reply with quote  Mark this post and the followings unread

Set the waypoint to 57 for lightning/ion cannon strike through the updated FinalSun. It needs correction.

If it still crashes, then it is not related to this.

Last edited by E1 Elite on Wed Nov 04, 2020 5:28 am; edited 1 time in total

Back to top
View user's profile Send private message
WadeSullivan
Vehicle Drone


Joined: 24 Aug 2017

PostPosted: Wed Nov 04, 2020 5:27 am    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
Set the waypoint to 57 for lightning strike through the updated FinalSun. It needs correction.

If it still crashes, then it is not related to this.


Ok could be because of the warzone MOD too?
In the normal game when you destroy the powerplants the obelisk turn off, in this mod doesnt.

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Nov 04, 2020 5:31 am    Post subject: Reply with quote  Mark this post and the followings unread

Ion cannon strike entry in FSData.ini was corrected in the latest FS patch. So set to wp 57 and try.

Back to top
View user's profile Send private message
WadeSullivan
Vehicle Drone


Joined: 24 Aug 2017

PostPosted: Wed Nov 04, 2020 5:56 am    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
Ion cannon strike entry in FSData.ini was corrected in the latest FS patch. So set to wp 57 and try.


The game loads ok, but after shut down the power plants nothing happen.
I got an idea, can i create a new house NOD1 and attached the power plants and the obelisk to that house, should turn off the obelisk after the power plants are down?

And of course make that new house allied to the NOD BASE (original base) and NOD (the soldiers) to not make them attack the new house

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Nov 04, 2020 7:02 am    Post subject: Reply with quote  Mark this post and the followings unread

If the event is for destroyed, then power down would not activate the trigger. Those powerplants has to be destroyed.

There is also an action to power down a building.

Back to top
View user's profile Send private message
WadeSullivan
Vehicle Drone


Joined: 24 Aug 2017

PostPosted: Wed Nov 04, 2020 7:27 am    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
If the event is for destroyed, then power down would not activate the trigger. Those powerplants has to be destroyed.

There is also an action to power down a building.


I will keep trying some things, if not work, maybe i will re-create a new house and test it

Back to top
View user's profile Send private message
Gabryel
Medic


Joined: 02 May 2020

PostPosted: Tue Nov 24, 2020 4:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

I am posting this here as it is possibly Trigger related.
I am working on a single player mission in Finalsun that came with the latest update of the TS Client. Naturally I test the mission again and again as I make changes to it. What I experience, I can no other way describe it: after random changes and saves the mission seems to fire triggers when they not suppose to fire. I meet enemy soldiers on the map where they simply not supposed to be, especially at that stage of the mission.

Anyone else had such experience?

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue Nov 24, 2020 5:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

May be share the modified map and give specific details.

Back to top
View user's profile Send private message
Gabryel
Medic


Joined: 02 May 2020

PostPosted: Tue Nov 24, 2020 7:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
May be share the modified map and give specific details.


Disabled all AI triggers to see if that helps. I don't need them to think for themselves, I need them to do exactly as told. Last mission run was going OK. I will still update the mission a few times, will involve editing the triggers as well. If it goes nuts again, I'll get in touch. Thanks.

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Wed Nov 25, 2020 8:55 am    Post subject: Reply with quote  Mark this post and the followings unread

For trigger debugging, you can make map snapshot during gameplay, and look at it with FS to see all units/ buildings enabled triggers and set variables.

To be able to make map snapshot, you need to modify your game exe with game exe modifier and search for something like make map snapshot instead of go to radar event.
If you successfuly modified exe, everytime you press V in game, it will make snapshot.map in your game directory, which is exact map created based on current game. This can be opened in FS.

This helped me a lot, when I needed to observe, if trigger logic I set was correct.

Back to top
View user's profile Send private message
Gabryel
Medic


Joined: 02 May 2020

PostPosted: Wed Nov 25, 2020 1:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

Tuc0 wrote:
For trigger debugging, you can make map snapshot during gameplay, and look at it with FS to see all units/ buildings enabled triggers and set variables.

To be able to make map snapshot, you need to modify your game exe with game exe modifier and search for something like make map snapshot instead of go to radar event.
If you successfuly modified exe, everytime you press V in game, it will make snapshot.map in your game directory, which is exact map created based on current game. This can be opened in FS.

This helped me a lot, when I needed to observe, if trigger logic I set was correct.


Am I going to see the triggers enabled or the triggers already fired?

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Nov 25, 2020 1:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

No. It saves the map in its current state as a map file that you can open in FinalSun or text editor.

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Wed Nov 25, 2020 1:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

You can check if trigger is enabled / disabled or check local variables.

You can add actions at the end of trigger like disabling trigger itself after finishing actions, and enable triggers if needed. I personaly make most of my repeating triggers to disable themselves at the end to make sure it won't be interfered with other events.

Back to top
View user's profile Send private message
Gabryel
Medic


Joined: 02 May 2020

PostPosted: Thu Nov 26, 2020 1:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

Alright, I did not edit the exe as the trigger I was suspicious of was enabled by default and attached to a celltag where the player needs to enter.

But, "lucky" me, just played the close-to-final version of the mission and could clearly see what trigger was fired that was not supposed to. Did not have this chance before. Trigger should not have fired, I was not even close to the celltags. Completed the mission.

I have replayed the mission immediately to completion and now, no issues.

The only difference between the 2 plays, in the first I did speed up the game at certain parts, in the second I was playing at Medium speed all along.

Ideas?

UPDATE: never mind, now it did it with me going again at Medium speed all along. Can it influence things if the map is open in Notepad++ while playing?

UPDATE": I think I got it. Those celltags were also attached to a building. I guess that confused the game. Mission worked fine on last testing.

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Fri Nov 27, 2020 10:36 am    Post subject: Reply with quote  Mark this post and the followings unread

If you suspect a specific trigger, could share its action, event, trigger and tag entries. Tags are attached to buildings and celltags which has any/all condition set.

Another way is to add text message actions to track triggers whether they are firing or not.

Back to top
View user's profile Send private message
Gabryel
Medic


Joined: 02 May 2020

PostPosted: Sat Nov 28, 2020 7:47 am    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
Another way is to add text message actions to track triggers whether they are firing or not.


Excellent idea! Implemented it and can even keep it as it fits the story.

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sat Nov 28, 2020 9:03 am    Post subject: Reply with quote  Mark this post and the followings unread

With TSClient, you can have local [Tutorial] section in the map itself. If same IDs are used as in tutorial.ini, then local IDs will be picked up, but ID changes are not reset to tutorial.ini value when moving to next map in a stitched campaign.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [34 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1879s ][ Queries: 13 (0.0118s) ][ Debug on ]