Quote from: Crimson Wizard on Wed 21/02/2018 13:52:21
Editor:
- Editor uses (and requires) .NET 4.0 and C# 6.0.
Does this means that in the new version we'll be scripting in C#? Nice.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: Crimson Wizard on Wed 21/02/2018 13:52:21
Editor:
- Editor uses (and requires) .NET 4.0 and C# 6.0.
Quote from: Cassiebsg on Wed 20/12/2017 19:22:31
I've reported this problem before too...
Wait until you're working on a different computer with a smaller res... you will never be able to reach those parts...
void LoadingCargo(int TransferredCargoSize, int CargoID) {
if ((TransferredCargoSize <= cShip.GetProperty("CargoCapacity") && (cShip.GetProperty("IsCargoHoldFull") == false)) {
cShip.SetProperty("IsCargoHoldFull", true);
cShip.SetProperty("TransportedCargo", CargoID);
}
else {
Display ("sorry, we have no room for that");
}
}
function on_mouse_click(MouseButton button)
{
if (button == eMouseLeftInv) {
// reset everything to start from scratch
gInteractionsMenu.Visible = false;
ListInteractions.Clear();
gInteractionsMenu.Height = 40;
ListInteractions.Height = 0;
// set the required variables
int AreThereInteractions = 0;
vIntMouseActionX = mouse.x;
vIntMouseActionY = mouse.y;
String CurrentOption;
activeItem = InventoryItem.GetAtScreenXY (mouse.x, mouse.y);
if(activeItem != null) { //safety check: pointers can be "null", and if so you can't call methods on them
ActionNumber = activeItem.GetProperty("Interaction_Number"); //Get the number of custom interactions thisobject/item/hotspot/character has
int ActionCounter = 1;
while (ActionNumber > 0)
{
CurrentOption = String.Format("Action_%d", ActionCounter);
ListInteractions.AddItem (String.Format("%s", activeItem.GetTextProperty(String.Format("%s", CurrentOption))));
gInteractionsMenu.Height += 26;
ListInteractions.Height += 26;
ActionNumber -=1;
AreThereInteractions += 1;
ActionCounter +=1;
}
if (AreThereInteractions > 0) {
gInteractionsMenu.X = mouse.x;
gInteractionsMenu.Y = mouse.y;
ListInteractions.SelectedIndex = -1;
lbMenuTitle.Text = String.Format("%s", activeItem.Name);
gInteractionsMenu.Visible = true;
}
}
}
else if (IsGamePaused() == 1) {
// Game is paused, so do nothing (ie. don't allow mouse click)
// This check goes after the inventory one because otherwise the inventory (which pauses the game) will prevent the item check to fire.
}
else if (button == eMouseLeft) {
// the old code for interacting with stuff in rooms
]
function ListInteractions_OnSelectionCh(GUIControl *control)
{
if (ListInteractions.SelectedIndex == 0) {
MenuAction_1 = true;
gInteractionsMenu.Visible = false;
if (GUI.GetAtScreenXY(MouseActionX, MouseActionY) != null) {
GUI.ProcessClick (MouseActionX, MouseActionY, eModeUsermode1);
}
else {
Room.ProcessClick (MouseActionX, MouseActionY, eModeUsermode1);
}
MouseActionX = 0;
MouseActionY = 0;
mouse.Mode = 1;
}
else if (ListInteractions.SelectedIndex == 1) {
MenuAction_2 = true;
gInteractionsMenu.Visible = false;
if (GUI.GetAtScreenXY (MouseActionX, MouseActionY) != null) {
GUI.ProcessClick (MouseActionX, MouseActionY, eModeUsermode1);
}
else {
Room.ProcessClick (MouseActionX, MouseActionY, eModeUsermode1);
}
MouseActionX = 0;
MouseActionY = 0;
mouse.Mode = 1;
}
//and so on...
}
function on_mouse_click(MouseButton button)
{
// called when a mouse button is clicked. button is either LEFT or RIGH
if (IsGamePaused() == 1) {
// Game is paused, so do nothing (ie. don't allow mouse click)
}
else if (button == eMouseLeft) {
//reset everything before a fresh start on a new interactive element
gInteractionsMenu.Visible = false;
ListInteractions.Clear();
gInteractionsMenu.Height = 40;
ListInteractions.Height = 0;
if (Room.GetProperty("InteractionMenu_Available") == true) {
//set the required variables
int AreThereInteractions = 0;
MouseActionX = mouse.x;
MouseActionY = mouse.y;
String CurrentOption;
//these are pointers I properly created outside this function because I use them for a couple other stuff too
activeHotspot = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
activeObject = Object.GetAtScreenXY(mouse.x, mouse.y);
activeCharacter = Character.GetAtScreenXY (mouse.x, mouse.y);
activeItem = InventoryItem.GetAtScreenXY (mouse.x, mouse.y);
//Handling Inventory items
if(activeItem != null) { //safety check: pointers can be "null", and if so you can't call methods on them
ActionNumber = activeItem.GetProperty("Interaction_Number"); //Get the number of custom interactions thisobject/item/hotspot/character has
int ActionCounter = 1;
while (ActionNumber > 0)
{
CurrentOption = String.Format("Action_%d", ActionCounter);
ListInteractions.AddItem (String.Format("%s", activeItem.GetTextProperty(String.Format("%s", CurrentOption))));
gInteractionsMenu.Height += 26;
ListInteractions.Height += 26;
ActionNumber -=1;
AreThereInteractions += 1;
ActionCounter +=1;
}
if (AreThereInteractions > 0) {
gInteractionsMenu.X = mouse.x;
gInteractionsMenu.Y = mouse.y;
ListInteractions.SelectedIndex = -1;
lbMenuTitle.Text = String.Format("%s", activeItem.Name);
gInteractionsMenu.Visible = true;
}
}
// Repeat the same code with appropriate pointers for objects, characters and hotspots
// They have an additional else clause at the end to handle character movement when you're not clicking on something interactable
Quote from: Ali on Sat 18/11/2017 01:50:21
The Iraq war was a pretty big deal, and fewer than 5,000 American soldiers died. Fewer than 200 British soldiers died, and over here it is widely viewed as having been a disaster. So in a more advanced world in which (we hope) war is less common, 80,000 deaths is enough. Surely?
Quote from: Ali on Sat 18/11/2017 01:50:21
I do think that the Klingon prosthetic are a problem, although I like the design. They should have ADRed all the Klingon dialogue. They seem to have solved the Buffy vampire teeth lisp, but nasal sounds come out weird. I love the idea of the Klingons speaking Klingon, but L'Rell seems to be the only one who gets near to it sounding natural. Most deliver dialogue as a series of meaningless barks.
Quote from: Snarky on Sun 15/10/2017 08:23:27
Of course, if you're just using the pointer in a single script, there's no need to make it a truly global variable in the first place â€" it can just be "script-global": defined globally in the script (rather than the header), but not exported.
//this in each room script
function room_Load()
{
currentRoomLostObject = objLostObject1 //whatever the object script name is in the current room
}
function room_AfterFadeIn()
{
object_appears_event();
}
// this in the global script
void object_appears_event () {
int RandomChance = Random (100);
if ((RandomChance > 90) && (ObjectCanAppear == true)) { //the second one is a global varialbe that tracks if the player has solved a certain other puzzle elsewhere
currentRoomLostObject.visible = true;
}
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.064 seconds with 16 queries.