Props and Script parameters

Discuss IB/IBx engine ideas, bugs, etc.
Post Reply
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Props and Script parameters

Post by Pongo »

Two questions for anyone who can help please!

I'm trying to create a prop that changes into another prop when the PC stands on it. I can't work it out. I've set up a trigger/script that removes the initial prop on contact, but I can't see how to then replace it with a different, new prop. I could perhaps "cheat" by having a tile underneath the initial prop that is revealed when the prop is removed, but it doesn't really work in the context I'm looking at. Is there a way to add a prop to the map in this way?

Second question, in relation to scripts - I'm getting confused with the parameters. I'm not getting some of the scripts to work, and I'm pretty certain its my fault for not filling in the parameters correctly. Is there a way of telling which parameters are required for each script and what they do? I remember in previous versions of Iceblink the parameters were fairly clear, so I've probably just forgotten how to find the information!

thanks
User avatar
Dorateen
Posts: 316
Joined: Thu Jan 16, 2020 3:03 pm

Re: Props and Script parameters

Post by Dorateen »

Hi Pongo,

I made a beacon go from unlit to lit by using the script

osSetPropLocation.cs

to replace the unlit beacon prop with a lit beacon prop. I had to first "store" the lit beacon on the map where the player could not see it, to be able to be called by the script when triggered. The set prop script uses the tag of the prop in parameter 1, and the coordinates of the desired location in parm 3 and parm 4. The second parameter is left blank.

Regarding parameters in general, I recall you have to look closely at the description box below ACTIONS to make sure what parameters are required, as missing some could throw an exception. The gaCastSpell script used in conversations for example, has parameter 4 reserved for a line of text and I believe you have to put something there. Was there a particular script giving you trouble?
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Re: Props and Script parameters

Post by Pongo »

Ah perfect, thanks Dorateen! osSetPropLocation did exactly what I needed, and the prop now changes when stepped on. Its very satisfying.

I'm probably missing something obvious with general parameters. When I set up a trigger I don't see an ACTIONS or description box. It sounds like I should be able to find the information on what the parameters do, which is great, so I must just be missing it somewhere. If I'm looking at the "TriggerEvents" boxes am I in the wrong place? Thanks!
User avatar
Dorateen
Posts: 316
Joined: Thu Jan 16, 2020 3:03 pm

Re: Props and Script parameters

Post by Dorateen »

Right, I was thinking of the box below ACTIONS in the conversation editor as shown below. There is no instructions for parameters in the trigger event box. It seems the only place to see what parameters are required and what you need to put in them is only visible when attaching a script to a conversation.
HearkParms.jpg
HearkParms.jpg (119.38 KiB) Viewed 7468 times
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Re: Props and Script parameters

Post by Pongo »

That's clear, thanks! I'll check scripts in the convo editor in future.
User avatar
slowdive
Site Admin
Posts: 509
Joined: Wed Jan 15, 2020 4:37 am

Re: Props and Script parameters

Post by slowdive »

I think all the scripts are in a script folder and you could just read all of them outside the toolset as well 😄 . I’ll double check that when in front of my computer.

EDIT: all the ga, gc, og, and os scripts are in the "default/NewModule/scripts" folder. They are just text files with the input information and not actual scripts with code.
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Re: Props and Script parameters

Post by Pongo »

Great, thanks!
Post Reply