Show Posts

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.

Messages - Cloudee1

Pages: [1] 2 3 ... 72
As far as SCI0 is concerned... using Studio Syntax...

Clicking on a view:
Code: [Select]
(if((> (send pEvent:x) (slime:nsLeft))and
    (< (send pEvent:x) (slime:nsRight))and
    (> (send pEvent:y) (slime:nsTop))and
    (< (send pEvent:y) (slime:nsBottom)))
              Print("You clicked on a view.")
)// end if item

Or, clicking on a Control Color
Code: [Select]
(if(== OnControl(ocSPECIAL (send pEvent:x) (send pEvent:y)) ctlSILVER)      // Silver Control Color
              Print("You clicked on the silver control color.")
)// end if control

In the above snippet, you can change it to check for a visual or priority color by changing the ocSPECIAL....
Code: [Select]
(if(== OnControl(ocPRIORITY (send pEvent:x) (send pEvent:y)) ctlSILVER)      // Silver Priority Color
(if(== OnControl(ocVISUAL (send pEvent:x) (send pEvent:y)) ctlSILVER)      // Silver Visual Color

and finally... clicking inside a rectangle...
Code: [Select]
(if((> (send pEvent:x) 273) and
    (< (send pEvent:x) 320) and
    (> (send pEvent:y) 0) and
    (< (send pEvent:y) 45))
              Print("You clicked inside a rectangle.")

Yeah Phil, you're right. This does work
Code: [Select]
Print(100 Random(1 4)) // Studio syntax

the differences in the syntax would be my guess why Claude thought it failed initially
Code: [Select]
(Print 100 (Random 1 4)) // Sierra syntax

That's my bad Claude for not pointing out at the time that I was using Studio syntax when I first posted the solution. Well if nothing else, you now have three ways to accomplish the same goal

I had that inkling, but I really wasn't sure... you could always use a switch statement... but it's not very pretty

Code: [Select]
  (if(Print("Do you really want to quit?" #title "Quit" #font gDefaultFont #button " Quit " 1 #button " Oops " 0))
    (switch(Random(0 3))
      (case 0 Print(100 1))
      (case 1 Print(100 2))
      (case 2 Print(100 3))
      (default Print(100 4))
    )// end switch
    = gQuitGame TRUE
  )//end if
)// end case
Or the best solution would be to create a variable to use

In the handle event method, add the new varable... your current variable list may look different than this, I am pulling up Manic's source code to copy from, but just add randomStatement to the end of whatever is listed in the var defines.

Code: [Select]
(method (handleEvent pEvent)
(var menuItem, hGauge, newSpeed, randomStatement)

Then in the case menu quit statement set the variable and use it.

Code: [Select]
     = randomStatement Random(1 4)
     (if(Print("Do you really want to quit?" #title "Quit" #font gDefaultFont #button " Quit " 1 #button " Oops " 0))
          Print(100 randomStatement)
          = gQuitGame TRUE

I can't think of any reason why this wouldn't work

* tested, works... you may need to adjust accordingly for Sierra syntax. As mentioned elsewhere, I have not yet made the change

Community Competitions / Re: Halloween Challenge
« on: September 23, 2016, 12:21:09 PM »
It's been a couple years and Halloween is coming up quick... anyone think it's about time for another one of these or are we all content working on our current projects for now and not really interested in committing a month to something else?

Also, your if statements don't seem to close before the else statement is called

Does this actually work?

*Ah wait, I see by the comments you are using sierra syntax... which I have barely looked at, so it may very well work... nevermind

I accomplished this in the MenuBar script.

Scroll down to the MENU_QUIT case statement and add in anything that you want. In my case I always add in the "Visit" line. In this case here it is hardcoded in the script, but it would be just as easy to send it to a text resource instead.

Code: [Select]

(case MENU_QUIT  
(if(Print("Do you really want to quit?" #title "Quit" #font gDefaultFont #button " Quit " 1 #button " Oops " 0))
= gQuitGame TRUE

I can't remember if you can use the Random procedure in the print statement directly, but if so then assuming in this case text resource 100 lines 1,2,3,4 then change the sciprogramming line above to something like...

Code: [Select]
Print(100 Random(1 4))

Everything-Else / Re: What's the name of this?
« on: September 17, 2016, 08:14:56 PM »
When we remade KQ3 at AGDI we had to remove the ability to kick the cat because all the interactions were taken. Sometimes you just have to sacrifice. I'm sure Sierra did likewise in a few instances in their remakes.

Yeah, what seems the most intuitive way to incorporate "dive" into the point and click interface... something I have gone round and round with.

Everything-Else / Re: Kawa's Soul Mate
« on: September 15, 2016, 07:19:38 AM »
It was only in reference to the Dating Pool characters and this imgurians artwork

Everything-Else / Kawa's Soul Mate
« on: September 14, 2016, 10:38:47 PM »
Kawa I was browsing Imgur Usersub and I found you a soul mate... or hell maybe even you for all I know

Forum Support and Suggestions / Re: Issue viewing AGI tutorials
« on: August 05, 2016, 10:01:47 PM »
When AGI games went down, I made the space for any AGI fans/programmers to have a home here. Unfortunately there weren't very many around at the time and haven't been many since. I started making space for AGI forums, but not knowing AGI myself, wasn't even sure which editor was the best one to use. There are still a number of links to many existing tutorials around. I had intended to copy them all over to here, unfortunately I never actually did and as time went on there was less and less need as we have only had a few AGI programmers make themselves known. The worst part is that most of the regulars here don't know anything about AGI either so the old tutorials are really all there is.

SCI Syntax Help / Re: Check if an object is disposed?
« on: April 13, 2016, 09:37:15 PM »
Why not hide them when they reach the target instead of disposing of them? It's safer and it looks the same to the player. Besides what troflip just said.
Might I also suggest positioning them off screen (400 400 seems to be my go to position for this) at the same time that you hide them. If you are going to be moving other things around the screen following the part where you hide these views then they may actually get hung up on them and it will take you longer than it should to figure out why.  :P

The Games and other Sierra Adventure stuff / Re: The Dating Pool
« on: April 13, 2016, 09:21:24 PM »
If I remember correctly, ego by default is blocked by views. May want to double check that there's an ignore actor in there.

SCI Syntax Help / Sierra Syntax vs. Studio Syntax
« on: February 25, 2016, 12:27:40 PM »
I know the push right now is for Sierra syntax over Studio syntax, but I am not really sure why...

Anyone care to weigh off on their opinions?

SCI Syntax Help / Re: Help Requested: Understanding changeState
« on: February 25, 2016, 08:28:17 AM »
I am agreeing with Phil on this one. I would bet money that your Ego isn't actually making it to that spot. I just tossed your changeState into a game to see what happened and it appeared to work fine. I had to change a couple of things because my current project is in sci1.1 though, so I am not positive.

I don't know about this line "(self:setScript(egoEnterScript))" in case 1, for now a "= seconds 1" would probably fit your needs just fine. Also, the "=  gProgramControl TRUE" Try putting that in case 0, instead of outside the switch. But I don't think that is preventing it from hitting case 1, just something that I noticed.

If you want ego to ignore white lines to make sure he isn't getting hung up on one, in case 0 change the send gEgo statement to this...
Code: [Select]
(send gEgo:ignoreControl(ctlWHITE)setMotion(MoveTo 186 130 egoEnterScript))

I am assuming that the pPodLid is where ego is crawling towards, here is what you could do to make sure ego isn't getting hung up on that. In case 0,  add in a quick call right underneath the ego line above, this...
Code: [Select]

If there are any other views in the way, you will want to do the same for them too. If there are any other control lines that might be blocking ego, for instance yellow if you are using one of the door scripts you might want to ignore them too.

If you need to undo these changes, I believe it's observeControl(ctlWHITE) and ignoreActors(FALSE) and don't worry, I use the Studio syntax too lol

SCI Syntax Help / Re: Help Requested: Pausing to let a loop play
« on: February 23, 2016, 12:19:23 PM »
Very easy and yes, a local boolean variable would be perfect

Up at the top, create a local variable
 egoDead = FALSE

Now, use this variable in your doit method that is forcing ego to a specific view, just add an if statement around what you already have going on there.

   What you already have...
 ) // end if not ego dead

and then finally, when your ego get's shot, you could stick this in case 0 of what Brandon had going for you, above where you set the ego's view. A better place would be wherever it is that you called the changestate, that way it is yours to control from the get go.

= egoDead TRUE

and that should be all it takes to steal control back from the doit method.

Pages: [1] 2 3 ... 72

SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.115 seconds with 23 queries.